hi,
i'm using GD2 function to editing high resolution pictures (300 dpi).

When i apply resizing or somme other function to my pistures, the quality of the image decreases to 96 dpi :queasy: 😕 .
I use the pictures to print so 96 dpi is very little.
can someone help me ? :bemused:

    hi,🙂

    in GD2 lib, the dpi quality is set to 96 by default and we can change it.

    So, i would like to know, if there is a possibility to rebuild GD2 lib with changing this value is souces code ?? 😕

    Thanks a lot.

      there is another graphic lib editing called Image Magick but not very powerfull and useless like GD2. 🙂 :rolleyes:

        You're confusing resolution with quality. JPEG is a lossy compression format, and you can adjust how lossy it is. That's the quality, and has nothing to do with its dpi resolution. Assuming you haven't been manipulating the image (which is unlikely, otherwise why would you be using GD Lib?🙂) then every pixel in the original image is in the output image; changing the dpi setting won't change that, and fiddling with the image quality won't change the dpi or the image's dimensions.

        GD Lib does reset the dpi to a default value (it does not retain such metadata in its internal image representation); but the appropriate dpi value is dependent on the output device, and GD assumes the result will be rendered on a screen.

        However, poking around php.net's documentation, I find this, which may be useful to you.

          Thank you for your answer 🙂

          It is true, quality it not the same as dpi resolution. the reason for using GD2 lib, it is because I need to dynamically add copyright text to the images. And when i do that the image take 96 dpi instead of 300

          i don't think that jpg format reduice the dpi resolution because i test all other format !!

            Write a Reply...