I’m not sure of terminology so the title may be confusing, so I’ll explain narrative style what I want to do:
Suppose you have a rectangular picture with the earth in the middle, or of a cat. I only want the earth, or the cat, so I use the extract feature on a photo editing program to remove it. How can I save it so that I can email to someone or keep it in my photos in such a way that when I put it in a graphic it’s automatically going to be just the round earth, or the cat head, or whatever, without the background?
Saving it as JPEG always merges it back into a rectangular and square photos. Is there a file extension that will have just the world or just the cat head? I can save it as .ufo (which I prefer not to as it’s a huge file that some emails and programs don’t recognize), .png, or most other type files on the program that I use, but I’m interested in the easiest to open and use in other programs or at other computers.
You need a file format that supports “Alpha Channel.” In other words, a pixel value that isn’t a color, but is transparent. Photoshop is one obvious choice, but .png might be a better choice.
I’m pretty sure all commonly used graphics formats use rectangular formats. However, it sounds like all you really need is to save the image with a transparent background. How to accomplish this would depend on which graphics editing program you are using. I found a good overview of filetypes that support transparent backgrounds:
I suspect that Bad Astronaut’s link means PSD, not PDF. PSD is one of Photoshop’s formats. PDF isn’t a really an image format; it’s a document layout format that can hold all sorts of things, including text and images.
Can’t you do this easily by just setting the height & width (in pixels) of the image in MSpaint?
(Image->Attributes)
Or am I not understanding the question?
The OP is talking about being able to save a non-rectangular shaped image (or an image file in which only a non-rectangular part will be visible if the image is placed on top of something else in a document or something.
Transparency is a partial solution, but not complete. If you make your background transparent, then whatever’s behind the image will show through, but if you stick it in amongst text, the text will still fill around the rectangular boundary (which is still there, just not visible). If you want text to flow around an irregular shape, I don’t think there is any easy or standard solution.
You want GIF or PNG. How to make the background transparent will depend on the art application you’re using.
GIF is the most widely supported but only supports 256 colors, which might make your picture look funky. IE6 doesn’t support transparent PNGs, and so probably any versions of Outlook from the IE6 days.
The short answer is that there are not, as far as I know, any image file formats that actually support defining a non-rectangular image (i.e., an image that is not an equilateral two-dimensional array of pixels).
There are two approaches to making pictures that appear to be non-rectangular, as mentioned previously: transparency and masking. Transparency involves defining a particular color value present in the image as being “transparent”, so that when displayed whatever pixels are of that value actually show whatever the background is – this approach is used in GIF and PNG images.
Masking involves defining a shape (either raster or vector) that is stored with the image and that is used to mask or block the image data from appearing. This is the approach used in native Photoshop (.PSD) files (though PSD files can also have transparency info), TIFF (.TIF) files, and others.
Both approaches depend on whatever application is consuming and displaying the image to understand and correctly act on the transparency and/or masking information. So whatever you do, there’s no way to guarantee that when someone else opens/views it, it’ll display as you intend, unless you specify the viewing program.
I am using IE6 and it renders transparent PNGs just fine. The Chinese characters at the top of http://www.isladelsol.com.es/ appear on the correct background color for me.
MS-Word supports text wrapping (as does PDF) around graphics (it ignores transparent areas as if they are not part of the graphic) but HTML does not directly support wrapping although I suppose there is some fancy way of doing it by using scripts or other tools.
Reason I ask is that PNGs can still have a background colour even when they have an alpha channel - in order to get the logo to work properly on my own site (in IE6), I had to set the background colour the same as the page background - so for Firefox users, it’s a logo with a transparent surround, floating over a coloured background, but for IE6 users, it’s a rectangle of the background colour, with the logo in the middle.
The photo editing software I use is Photo Impact Pro if anyone is familiar. (I really need to get and learn Photoshop.) I also have Picasa of course. Does anybody know what buttons to push to save the rectangle as a transparency on these?
Perhaps they’re using a hack, or perhaps MS patched IE6 to support it? I can’t say. But definitely it wasn’t supported for most of history and you’d be unwise to depend on it.
AFAIK IE6 has supported transparency for a LONG time. Long time. Probably since it first came out.
Now, GIF only supports on/off transparency (transparency by one palette color as opposed to transparency by alpha channel) which is also supported by PNG and both formats work fine in IE6 and have always worked as far as I can remember.
But PNG also supports gradual transparency pixel by pixel (alpha channel) and this is what probably is not supported in IE6 but this does not exist at all in GIF.
So, Everything GIF can do in this regard PNG can do better. File sizes are smaller too. The only thing GIF supports which PNG does not is multi-image motion. Other than that PNG is superior in every respect and, again, AFAIK, has always been supported by IE6.