Show thumbnails and transparent background

Any tips and tricks that has to with the ADDT that doesn't fit into one of the other categories
antonio
Posts: 77
Joined: 2010-09-28 11:48

Show thumbnails and transparent background

Post by antonio » 2012-09-20 14:17

Hi all,
I would like to use PNG images on a site built with ADDT.
I show images using the "show thumbnail" behaviour.
I upload the image using the "upload and resize behaviour".
I'm using GD.
Once I show thumbnail on the page the image has solid black background instead of his transparent background.

Is there an easy fox for this, other then uploading ready made images in png without resizing? (but I think not all customers will be able to resize image properly...).

TIa

tony

User avatar
Fred
Site Admin
Posts: 491
Joined: 2010-02-15 12:10
Location: Armagh, Northern Ireland
Contact:

Re: Show thumbnails and transparent background

Post by Fred » 2012-09-20 16:00

Hi Tony,
Check this in the GD php manual and see if you can figure something.
http://php.net/manual/en/function.image ... parent.php

antonio
Posts: 77
Joined: 2010-09-28 11:48

Re: Show thumbnails and transparent background

Post by antonio » 2012-09-21 09:37

Fred wrote:Hi Tony,
Check this in the GD php manual and see if you can figure something.
http://php.net/manual/en/function.image ... parent.php
Hi Fred,
thanks for the link.
I've read them but it seems that you must specify a transparent color.
But in PNG I cannot set a specific color as transparent.
I only would like to resize a png retaining his original trnsparency.
I think I'll have to instruct the customer that will upload images to use a fixed color background (white) for his images :(

Thanks, anyway.

tony

User avatar
Fred
Site Admin
Posts: 491
Joined: 2010-02-15 12:10
Location: Armagh, Northern Ireland
Contact:

Re: Show thumbnails and transparent background

Post by Fred » 2012-09-21 10:38

One thing that I did notice when uploading png files is that if you use a "true" colour, say red, it would mess the colour up.
But if you use a red that is just a couple of shades off the true red it would upload and resize.

Anyway, why dont you just try an image with a white background and set white is the background colour and see what happens.

It is not a problem with interakt it is a problem with GD.
You can try it here and you will get the same result. i.e. a black background.
http://www.resizephotos.co.uk/

Post Reply