I use a simple conversion solution.

imagepng(imagecreatefromstring($file1, $file2); 

The background remains white.

  • Does this code work? Bracket is not closed - users
  • why should it become transparent? - teran
  • one
    No More precisely, the jpeg uses a rather complicated compression algorithm for this, even if you save a pure white picture, you most likely will not find even 2 pixels of white color standing next to it. Therefore, you will have to write a rather complicated algorithm to let the computer understand what white color is in your understanding. - fens

0