Set image from memory


#1

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


#2

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.


#3

Simple,

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



#4

Dear roey,

Thanks for your consideration.

Please download example here.

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


#5

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


#6

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