[Courses] [gimp] Exporting and image formats [Re: Lesson 1:
(homework done)]
Mary
mary-linuxchix at puzzling.org
Mon Jan 31 09:22:22 EST 2005
On Sun, Jan 30, 2005, Jon Drews wrote:
> "Your image should be exported before it can be saved for the
> following reasons:
> JPEG can't handle transparency"
>
> What is the purpose of resizing or are you going to cover that later?
When I do this, one of the options beneath the error message is
something like "Export Now" and you can just select it and it will save
to JPEG. I'll post a screenshot when I get home.
GIMP images support all kinds of options, including things like
transparency, layers (separate image bits piled on top of each other
which can be edited separately and switched around) and so on. Most
formats won't support all of them (xcf does for fairly obvious reasons
-- why have a custom format especially for the GIMP that doesn't?), so
you will quite frequently need to export images in order to save them in
the format you want.
The exporter is fairly sensible: it will do things like turn transparent
areas into your default background colour in formats that can't handle
transparency; and merge all the layers into one for formats that can't
handle layers.
Keep in mind that most image formats are "lossy" -- that is, they do not
store the exact state of every pixel, they store an approximation based
on regions. If you want to do extended work on a single image, it's
sometimes worth saving a copy in a lossless format (XCF is best if
you're always going to work with the GIMP) and exporting a copy for your
website or whatever each time.
> Also I saved the same image as a *.png but the *.png is much larger
> than the *.jpg (44k vs 409k) despite the fact that the quality appears
> to be about the same. Is the *.jpg format that much better than *.png
> ? The *.png is here: http://www.silbsd.org/beastie/merckle2A.png
> Both were saved from the same *.xcf file.
They have different purposes.
*.jpg: JPEG is a lossy format optimised for storing photos (and other
images with regions of shading rather than blocks of colour) in a small
amount of space.
*.png: PNG is a lossless format optimised for storing images with large
blocks of a single colour (as an example, imagine a flow chart or
diagram with lots of blue boxes or something) in a small amount of
space.
So, for a photo, yes, the JPEG version will usually be much smaller. the
PNG algorithm isn't designed to compress regions with similar shadings
like most photos have, it's designed to compress regions where all the
pixels are exactly the same colour.
Another couple of common ones:
*.tiff: TIFF is a lossless format sometimes used for storing photos if
you want an exact copy each time. Some digital cameras and scanner
software produce these. People will usually convert to JPEG before
putting these photos on the web: TIFF files are much larger than JPEGs.
*.gif: GIF is an older format which has roughly the same use as PNG. It
has better support than PNG in old web browsers, but was patented for a
long time and may still be in some countries. Because it was actually
illegal for software to produce GIF files without paying royalties,
there was a big push a while back for Free Software users to adopt PNG
instead. The PNG format is also meant to be technically superior, but I
don't know exactly why.
-Mary
More information about the Courses
mailing list