P
Peter Oliphant
I'm trying to create 'sprites', which are graphic objects with shapes other
than just rectangles. As such, I need to be able to establish a transparent
color.
So, I create images using Photoshop, make the area I want transparent black.
But when I store them as jpg files, it seems to store it it a format that is
different from other jpg files. The reason I know this is that if I save it
using Photoshop the icon for it is NOT a thumbnail but a red X. If I load
this file into Paint and just save it back out, THEN it has a thumbnail in
its listing! Obviously, something changed, and for some reason Photoshop
doesn't put out the same jpg as Paint does.
Anyway, I take such images and load them into a Bitmap, and change the
transparent color to Color::Black (I'm using VC++ 2005 Express, managed). I
can see that this WOULD work. That's because an image I've saved using
Photoshop, and then loaded and saved using Paint, results in some of the
black pixels still being pure black, so are transparent. This proves that
Black IS transparent. But it looks like most of the black in the image is
converted to close-to-black (probably as a result of the lossy nature of
jpg), which of course is NOT transparent, resulting in ugly fringes.
Oddly, my version of Photoshop does not seem to have an option to save in
bmp format (a format which is not lossy). That might work too...
Any hints on how to create an image file and forcing black areas to remain
black? Thanx!
than just rectangles. As such, I need to be able to establish a transparent
color.
So, I create images using Photoshop, make the area I want transparent black.
But when I store them as jpg files, it seems to store it it a format that is
different from other jpg files. The reason I know this is that if I save it
using Photoshop the icon for it is NOT a thumbnail but a red X. If I load
this file into Paint and just save it back out, THEN it has a thumbnail in
its listing! Obviously, something changed, and for some reason Photoshop
doesn't put out the same jpg as Paint does.
Anyway, I take such images and load them into a Bitmap, and change the
transparent color to Color::Black (I'm using VC++ 2005 Express, managed). I
can see that this WOULD work. That's because an image I've saved using
Photoshop, and then loaded and saved using Paint, results in some of the
black pixels still being pure black, so are transparent. This proves that
Black IS transparent. But it looks like most of the black in the image is
converted to close-to-black (probably as a result of the lossy nature of
jpg), which of course is NOT transparent, resulting in ugly fringes.
Oddly, my version of Photoshop does not seem to have an option to save in
bmp format (a format which is not lossy). That might work too...
Any hints on how to create an image file and forcing black areas to remain
black? Thanx!