Jeff Andersen
Jeff Andersen

Reputation: 342

When dealing with GD Library unwantedly altering colors

I'm merging multiple small images into a rectangular mosaic.

When dealing with a small number of source images it turns out fine:

enter image description here

But when dealing with a larger number of sources it turns out a sepia like effect:

enter image description here

Is there any technique I should be used to preserve the colors?

My method for merging the images is essentially running a script that loops through the source images using imagecreatefromjpeg() to grab it, followed by imagecopy() to merge the source onto the collective destination image (and runs until all images have been added/placed).

Upvotes: 0

Views: 126

Answers (1)

Jeff Andersen
Jeff Andersen

Reputation: 342

instead of using imagecreate() as my starting point, I changed to imagecreatetruecolor() and it has resolve the color loss issue.

Upvotes: 2

Related Questions