aNubies Posted March 26, 2013 Share Posted March 26, 2013 Alright im testing the imagecreatefromstring() function, but it always give me an error saying "data is not recognized format". This is base on my previous post that what i want to do is convert my .pix file which is a map file into a jpeg file. I tried to read the stream before converting it into the function but no luck, same with file_get_contents but no luck also. Help here please. Thank you in advance. Quote Link to comment https://forums.phpfreaks.com/topic/276162-imagecreatefromstring-function/ Share on other sites More sharing options...
Barand Posted March 26, 2013 Share Posted March 26, 2013 It would have been better if this post were in the same thread as your other one so people know what you are talking about. However, I did read the other one. What you will need to do, as the pix filetype is not one recognised by the GD library, is create a new gd image read the pix file and get the colour values for each pixel (using the pix file format definition I pointed you to) set the corresponding pixel value in the gd image save gd image as jpeg Quote Link to comment https://forums.phpfreaks.com/topic/276162-imagecreatefromstring-function/#findComment-1421229 Share on other sites More sharing options...
aNubies Posted March 27, 2013 Author Share Posted March 27, 2013 Okay barand, I'm gonna give it a shot. Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/276162-imagecreatefromstring-function/#findComment-1421289 Share on other sites More sharing options...
aNubies Posted April 1, 2013 Author Share Posted April 1, 2013 Sir Barand, I saw a convertbmptogd function yet it won't recognize the .pix file. Do you have any other way how to read the color values of the .pix file? Quote Link to comment https://forums.phpfreaks.com/topic/276162-imagecreatefromstring-function/#findComment-1422199 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.