Hi Takeshi,
can you please add the following function.
Thanks,
Pascal
-----------------------------------
// 10.10.2004 (pdrecker at users.sourceforge.net)
void
PdfJpegImage::LoadFromMem(unsigned char *byteData,
unsigned int len, int image_width, int image_height,
int jpeg_color_space, int bits_per_component)
{
FreeImage();
try
{
fWidth = image_width;
fHeight = image_height;
fBitsPerComponent = bits_per_component;
AddFilter(PDF_FILTER_DCT_DECODE);
if (jpeg_color_space == 1)
fColorSpace = PDF_CS_DEVICE_GRAY;
else if (jpeg_color_space == 3)
fColorSpace = PDF_CS_DEVICE_RGB;
else
fColorSpace = PDF_CS_DEVICE_CMYK; // supported? !!!
}
catch (PdfException& e)
{
throw;
}
GetStream()->Write(byteData, len);
fHasImage = true;
}
Logged In: YES
user_id=695611
Yeah. Great!!!
But if would be a little nicer to dont have to parse the
jpeg data outside, just do a LoadFromMem(unsigned
char* byteData, unsigned int len).
Would also like to have the correspondig function
PdfPngImage::LoadFromMem() and the function
PdfImage::Duplicate().
Logged In: YES
user_id=1082798
That would be great also for me!
Encoded outside or passed as raw data and then encoded by
choice: both would be nice.
I for example would like to insert a zip compressed CMYK
image, from memory.
Logged In: YES
user_id=1535544
Hi.
I've added a method LoadFromMem, I'd like to know where/how
to submit a patch so it can be reviewed and added to code.
Regards,
Stuart S.