www.webdeveloper.com
Results 1 to 2 of 2

Thread: imagecreatefrompng() and transparency

  1. #1
    Join Date
    Dec 2006
    Posts
    6

    imagecreatefrompng() and transparency

    I am using imagecreatefrompng() to create thumbnails for images as part of an image gallery uploading script. Everything works as expected (dimension, saving the PNG file where I want it, etc) but when I use it on a PNG image with transparency, imagecreatefrompng() makes the transparent parts of the image black.

    Does anyone know of an easy way to fix this problem?

    Thanks,
    Marcus

  2. #2
    Join Date
    May 2010
    Location
    Connecticut
    Posts
    19
    did you try

    PHP Code:
    imagealphablending($imgtrue);
    imagesavealpha($imgtrue); 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles