-TG:
At 10:51 AM -0400 5/8/06, <tg-php@xxxxxxxxxxxxxxxxxxxxxx> wrote:
Actually I don't believe this is exactly right.... from playing
around with Photoshop you can see that you change an image's
resolution under Image -> Image Size and if you turn off "Resample
Image", it will retain the same pixel dimensions.
What you are doing in Photoshop is simply changing the number of
samples in the image. You are not changing the dpi of the image. In
fact, you can still show the image in any dpi you want, you just
changed the ability of the image to retain it's quality over a larger
range of dpi, nothing more.
GIF's are limited to 72dpi (or ppi if you prefer.. pixel per inch)
which matches what is typically displayable or desirable for web
content. But when you go to print that webpage, you really see the
lack of quality in that GIF image.
Surprise, surprise -- why is that?
GIF's were developed for web pages and the typical monitor was 72 dpi
(now, they vary greatly).
When you take a GIF and print it, you now have a different medium at
which to view the image. If you can set your printer to 72 dpi, and
your monitor to 72 dpi, then you'll see very little difference
between the monitor image and the printer image. However there are
some differences in the way a monitor and paper shows an image
(brightness and so on).
If you use a JPG and set it for around 300 dpi/ppi, it prints out a LOT nicer.
Yes, and if you have images that are capable of 2880 dpi, and you
print them at 2880 dpi, they will look even better, but so what?
You have missed the point. Outside of some newer cameras that embed
capture information into the headers of the image file, jpg's do not
have dpi information in them. I suggest you read:
http://www.faqs.org/faqs/jpeg-faq/part1/
http://www.faqs.org/faqs/jpeg-faq/part2/
You will not find any mention of dpi. Why? Because DPI is not
relevant to the image -- it only pertains to the display of the image.
Go ask a chicken what "eggs per package" it's egg will be put in, a
dozen, a dozen and a half, two dozen, or what? Eggs, like pixels,
haven't friggen a clue as to what packing they're going to be put in.
Again, DPI is a way to display an image and is not something
intrinsic within the image itself.
tedd
--previous --
So there's a real easy answer to this question... yes, you can
change DPI on the fly when converting JPG -> GIF... the downside is
that you're converting to 72dpi whether you like it or not because
that's the GIF standard.
If somebody has more or better information on this, I'd love to hear
it but this is how it is as far as I know and have experienced.
-TG
= = = Original message = = =
At 11:07 PM +0200 5/7/06, Gustav Wiberg wrote:
Hi there!
Is there any way of converting a jpg to gif and change dpi on the fly?
Best regards
Gustav Wiberg
Gustav:
It depends how big the fly is.
But seriously, yes you can change a jpg into a gif by loading it in
as a jpg (imagercreatefromjpeg) and then saving it as a gif
(imagegif).
See: http://www.weberdev.com/imagegif
But, the dpi thing is not meaningful. DPI is how the image is
displayed and not something intrinsic within the image itself. The
image has simply a size (x by y pixels), and how that image is
previewed is outside its purview (I liked that play on words) :-)
If you want to change the image's size, then that can be done via
magecopyresized. But, you cannot change the DPI of an image.
tedd
___________________________________________________________
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.
--
--------------------------------------------------------------------------------
http://sperling.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php