I got image through network as a buffer.
I want load the buffer and specify the zero layer,but I have not found the C-API
So I have to write the buffer to local file,and load it from the filename like "lena.jpg[0]"
Is there C-API to load psd buffer specify layer, if not could you add one?
Is there C-API to load psd buffer specify layer
Re: Is there C-API to load psd buffer specify layer
To get the number of layers (images):
size_t numLayers = MagickGetNumberImages( wand );
MagickSetIteratorIndex(wand, index) allows you to travel through all PSD layers.
You can obtain the name of the layer using:
const char" label = MagickGetImageProperty( wand, "label" );
size_t numLayers = MagickGetNumberImages( wand );
MagickSetIteratorIndex(wand, index) allows you to travel through all PSD layers.
You can obtain the name of the layer using:
const char" label = MagickGetImageProperty( wand, "label" );
Re: Is there C-API to load psd buffer specify layer
Thanks!
But it does not solve my problem. You must get a wand initialized from the buffer.
I have a buffer read from psd file, it is too slow and allocate too much memory while initializing wand from the whole buffer.
So I want to initialize wand from 0-layer of the buffer.
But it does not solve my problem. You must get a wand initialized from the buffer.
I have a buffer read from psd file, it is too slow and allocate too much memory while initializing wand from the whole buffer.
So I want to initialize wand from 0-layer of the buffer.