If you create an image 500x500 and then view it on a 1280x1024 15" screen, then the image will be 5 3/16 inches per side which equates to 96dpi.
However, if you display that same image on a smartphone with a 800x480 4.3 inch screen, then (assuming that the browser doesn't do any scaling) the image will be 2.1 inches per side; which translates to 237 dpi.
Same image, different dpi depending upon what it is displayed or printed on.
In order to view a 500x500 image at 300 dpi, it would have to be displayed or printed on a device capable of 300 pixels per inch -- eg. a printer -- and would show up as 1.67 inches per side.
The first problem appears to be that you are creating 8-bit color images instead of 24-bit color images. That's your fault not the modules.
If you do my $gd = GD::Image->new( 500, 500 ); then you'll get a palettised 8-bit color image.
If you do my $gd = GD::Image->new( 500, 500, 1 ); then you'll get a 24-bit (true)color image.
You'll probably need to make some other changes to your current code to achieve best results, but as you haven't posted it, we can't advise you further.
In reply to Re: How to create images with 300dpi?
by BrowserUk
in thread How to create images with 300dpi?
by aky
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |