Jump to content
  • 0

Everything is transparent when opening a .PAL file through PHP


Question

Posted (edited)

I use this code to unpack the pal file and make the pixel:

$color2 = unpack('H2', fread($this->pal, 0x01));

$bg_color = ImageColorAllocate($im,$rgb[0],$rgb[1],$rgb[2]);
if($color[1] == '00') ImageColorTransparent($im,$bg_color);
ImageSetPixel($im,$bg_length,$bg_y,$bg_color);

Everything is transparentttt whyyyyyy. My guess is that the 'index' or whatever you call it isn't incrementing or something.

I got it to display its palette table though. Any ideas?

I'm not really good with PHP, please halp.

Edited by kenshn111

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...