Image quality problems

Hello I am having image quality problems. Below is my code I have tried various resolutions. One thing i have noticed is even if i set the image size it still seems to be roughly 2x the size that I specified. It seems to come out grainy. I have tried various configs. I would be appreciative if you could give me an example along with a sample image in vb that I could test against. Thank you. Moses

Dim hf1 As HeaderFooter = New HeaderFooter(section)
image1 = New Aspose.Pdf.Image(hf1)
image1.ImageInfo.File = Request.PhysicalApplicationPath & “TopLogo.jpeg”
image1.ImageInfo.ImageFileType = ImageFileType.Jpeg

‘’'image1.ImageInfo.IsBlackWhite = True
‘’'image1.ImageInfo.ComponentNumber = 3
‘’'image1.ImageInfo.BitsPerComponent = 8
‘’‘image1.ImageHeight = 80
‘’‘image1.ImageWidth = 620
image1.ImageScale = 0.5
‘’’ image1.ImageInfo.FixWidth = 300
‘’’ image1.ImageNotes.
hf1.Paragraphs.Add(image1)

Dear Moses,

Thank you for considering Aspose.

The lines you have commented are not needed for JPEG image. If you use the following code:

Dim hf1 As HeaderFooter = New HeaderFooter(section)
image1 = New Aspose.Pdf.Image(hf1)
image1.ImageInfo.File = Request.PhysicalApplicationPath & “TopLogo.jpeg”
image1.ImageInfo.ImageFileType = ImageFileType.Jpeg
hf1.Paragraphs.Add(image1)


The image quality and size in the PDF is the same as the JPEG file. Please make sure you have choosed zoom factor to 100% in Acrobat when you compare the image quality and size.

If you still can’t solve the problem, please let me know.

Thanks for the quick response. I am still having a problem with the quality of the image.
https://secweb.cvm.msu.edu/PDFTEST/WebForm1.aspx

This is a test page and the image at 100% zoom factor is still grainy and the image is grainy even when I print it out. I have tried various images that print out/ display fine in other programs but for some reason are blurry in this one.

Thanks in advance for your help

Moses

Dear Moses,

Thank you for considering Aspose.

Which type of image do you use? Would you please send the image to me?

Hi
I’m having the same problems as the previous poster. I have a big image (790 *295) at a resolution of 300 points/inch.
When i tried to insert this image in my pdf document, it’s too big: it doesn’t fit in.

this is the code I’m using:
---------------
Aspose.Pdf.Image image1 = new Aspose.Pdf.Image(sectionIntro);
sectionIntro.Paragraphs.Add(image1);

image1.ImageInfo.ImageFileType = ImageFileType.Jpeg;
image1.ImageInfo.File = “c:\temp\logobig.jpg”;
image1.ImageScale= 0.41764705882352941176470588235294f;
image1.ImageInfo.FixWidth = 170;
System.IO.BinaryReader reader = new System.IO.BinaryReader(mstream);
image1.ImageWidth = 170;
image1.ImageHeight = 71;
image1.ImageInfo.ComponentNumber = 3;
image1.ImageInfo.BitsPerComponent = 8;

-----------

I also tried to insert a smaller jpg image, but then on print it’s very bad quality: not sharp at all.
If this is not the way to insert high quality images, can anyone tell me how to do insert high quality images?

kind regards,
Dennis vb
(I can read this forum again on monday…)

Dear Dennis,

Thank you for considering Aspose.

Please refer to thread Using Gif file.

Hi

Thanks for the link. The solution mentioned in this thread solved my problem with the images! So I can produce high quality PDF files now.

kind regards
Dennis vB

Our solution:

  • your fax server re-sends image files to our email address;
  • we change image file name to a reference mentioned on it;
  • then files are sent to your FTP Server, email address or attached to web form;
  • thus you can use names of image files as references in order to post e-documents to the designated cells of a database.

You may try 3 days for free!!! The free trial period can be prolonged!!!

For detail information welcome to our website http://www.alcom.od.ua


e-mail:
alcom@te.net.ua or alcom.info@gmail.com

All things are difficult before they are easy (Thomas Fuller)