Set image from memory

Please help me

We are evaluating aspose.pdf to use in our product.
I can’t see anywhere in the documenting how I set image from memory (I’m using C#)

Roey

Hi Roey,

Could you elaborate on your needs?

It’s encouraged to discuss technical topics here, instead of sending email to info@aspose.com. Thanks for your cooperation.

Simple,

I have bitmap object (using c#) and I want to insert it as image to the PDF. How do I do that?


Dear roey,

Thanks for your consideration.

Please download example [here](http://www.aspose.com/products/aspose.pdf/fixes/MemoryImageExample.zip).

Only JPEG and CCITT fax image format is supported for memory image. Please use JPEG format when save a Bitmap object to stream.

Tx for the quick reply.
It’s almost working now - I get the image but as garbage and very poor quality. Any ideas?

found the problem.
The cuase Image scaling - for some reason the scaling using aspose.pdf produces very poor quality.
When doing the scaling myself and then feed the pdf object pre-scaled image it works fine