class_docstr: An output connection.
  
      
docstr: Make a new target to write to an area of memory.
  
  Make a new target that will write to memory. For example::
  
      target = pyvips.Target.new_to_memory()
  
  You can pass this target to (for example) :meth:`write_to_target`.
  
  After writing to the target, fetch the bytes from the target object
  with `target.get("blob")`.
docstr_tok: ["Make","a","new","target","to","write","to","an","area","of","memory",".","Make","a","new","target","that","will","write","to","memory",".","For","example",":",":","target","=","pyvips.Target.new_to_memory","(",")","You","can","pass","this","target","to","(","for","example",")",":","meth",":","`","write_to_target","`",".","After","writing","to","the","target",",","fetch","the","bytes","from","the","target","object","with","`","target.get","(","``","blob","''",")","`","."]
code: def new_to_memory():
      """Make a new target to write to an area of memory.
  
      Make a new target that will write to memory. For example::
  
          target = pyvips.Target.new_to_memory()
  
      You can pass this target to (for example) :meth:`write_to_target`.
  
      After writing to the target, fetch the bytes from the target object
      with `target.get("blob")`.
  
      """
  
      # logger.debug('VipsTarget.new_to_memory:')
  
      pointer = vips_lib.vips_target_new_to_memory()
      if pointer == ffi.NULL:
          raise Error("can't create output target from memory")
  
      return Target(pointer)
  
file_path: pyvips/pyvips/vtarget.py
imports: from __future__ import division
  import logging
  import pyvips
  from pyvips import ffi, vips_lib, Error, _to_bytes
label_desc: Use image node_id 4 for calling the Target obj's underlying member method code with example usage: obj.new_to_memory() and returns: Target