|
|||||
|
|
#1 |
|
|
png) into another type? Especially, I know I can read a gif with GD2, but I really need to be able to save it as a png. Is that possible? -dg |
|
|
#2 |
|
|
> (PHP4.3.4) Is it possible to change an image that's in one type (jpg, gif, > png) into another type? Especially, I know I can read a gif with GD2, but I > really need to be able to save it as a png. Is that possible? Why don't you just have a look at the do***entation? http://www.php.net/manual/en/function.imagepng.php Regards, Matthias |
|
|
#3 |
|
|
>(PHP4.3.4) Is it possible to change an image that's in one type (jpg, gif, >png) into another type? Especially, I know I can read a gif with GD2, but I >really need to be able to save it as a png. Is that possible? Yes, it is. -- Andy H***all <andy@andyh.co.uk> / Space: disk usage analysis tool http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space |
|
|
#4 |
|
|
"dan glenn" <dan_danboy@yahoo.com> wrote in message
news:MIRAc.74958$Im3.18399@newssvr29.news.prodigy. com... > (PHP4.3.4) Is it possible to change an image that's in one type (jpg, gif, > png) into another type? Especially, I know I can read a gif with GD2, but I > really need to be able to save it as a png. Is that possible? > You can convert gif into png or jpeg but no vice-versa. The imagepng() and impagejpeg() will save the image into the respected format. |
|
|
#5 |
|
|
"Chung Leong" <chernyshevsky@hotmail.com> wrote in message news:xc2dnb2jItuK00ndRVn-vg@comcast.com... > "dan glenn" <dan_danboy@yahoo.com> wrote in message > news:MIRAc.74958$Im3.18399@newssvr29.news.prodigy. com... > > (PHP4.3.4) Is it possible to change an image that's in one type (jpg, gif, > > png) into another type? Especially, I know I can read a gif with GD2, but > I > > really need to be able to save it as a png. Is that possible? > > > > You can convert gif into png or jpeg but no vice-versa. The imagepng() and > impagejpeg() will save the image into the respected format. OK - I'm now saving .gif's to .png's, but I note that I lose the transparancy (if there is one) in doing so. How can I maintain the transparancy in the PNG??? -dg |
|
|
#6 |
|
|
"dan glenn" <dan_danboy@yahoo.com> wrote in message
news:UF2Bc.75569$1R7.72583@newssvr29.news.prodigy. com... > > "Chung Leong" <chernyshevsky@hotmail.com> wrote in message > news:xc2dnb2jItuK00ndRVn-vg@comcast.com... > > "dan glenn" <dan_danboy@yahoo.com> wrote in message > > news:MIRAc.74958$Im3.18399@newssvr29.news.prodigy. com... > > > (PHP4.3.4) Is it possible to change an image that's in one type (jpg, > gif, > > > png) into another type? Especially, I know I can read a gif with GD2, > but > > I > > > really need to be able to save it as a png. Is that possible? > > > > > > > You can convert gif into png or jpeg but no vice-versa. The imagepng() and > > impagejpeg() will save the image into the respected format. > > OK - I'm now saving .gif's to .png's, but I note that I lose the > transparancy (if there is one) in doing so. How can I maintain the > transparancy in the PNG??? > Hmmm, I just tried it and it works correctly. I'm using 4.3.6. Maybe GD is saving the PNG with alpha-channel info (which IE doesn't support) instead of single color transparency. View the image in Netscape or open it with Photoshop and see if transparency is there. |
|
|
#7 |
|
|
"Chung Leong" <chernyshevsky@hotmail.com> wrote in message news:ie2dnQO1r4AZRkndRVn-gg@comcast.com... > "dan glenn" <dan_danboy@yahoo.com> wrote in message > news:UF2Bc.75569$1R7.72583@newssvr29.news.prodigy. com... > > > > "Chung Leong" <chernyshevsky@hotmail.com> wrote in message > > news:xc2dnb2jItuK00ndRVn-vg@comcast.com... > > > "dan glenn" <dan_danboy@yahoo.com> wrote in message > > > news:MIRAc.74958$Im3.18399@newssvr29.news.prodigy. com... > > > > (PHP4.3.4) Is it possible to change an image that's in one type (jpg, > > gif, > > > > png) into another type? Especially, I know I can read a gif with GD2, > > but > > > I > > > > really need to be able to save it as a png. Is that possible? > > > > > > > > > > You can convert gif into png or jpeg but no vice-versa. The imagepng() > and > > > impagejpeg() will save the image into the respected format. > > > > OK - I'm now saving .gif's to .png's, but I note that I lose the > > transparancy (if there is one) in doing so. How can I maintain the > > transparancy in the PNG??? > > > > Hmmm, I just tried it and it works correctly. I'm using 4.3.6. Maybe GD is > saving the PNG with alpha-channel info (which IE doesn't support) instead of > single color transparency. View the image in Netscape or open it with > Photoshop and see if transparency is there. Yes, you're right - the transparency is there. It was just IE. Gad. OK - is there a way I can make imagepng() save the PNG as a palette-based (8-bit, 256-color) single-color transparancy? (These will work in IE, as they don't use the alpha channel) |