Jump to content

byte


csckid

Recommended Posts

I'm trying to convert string into image or byte to image; anyone would work. When I print byte as string it outputs "[b@d590dbc". I have no idea what sort of encoding is applied to it.

And when I print ByteArrayOutputStream as string it outputs

 

‰PNG
iiCCPPhotoshop ICC profile¡»Dw¿n§î˜ž¾^€žLo§Þy½çú}@q¤øSâ(RÊjJåå4åe˜2AU£šRݨ¡T............

Can this peculiar string be converted into image? :confused::shrug:

Link to comment
https://forums.phpfreaks.com/topic/208185-byte/#findComment-1088169
Share on other sites

there is an imagestring function for creating a string on an image.

I should be able to convert string into any file. like mp3

 

What do you mean "convert"?  Do you want to save this string as a file?  If so, have you tried:

 

file_put_contents('/path/to/save/file.png', $string);

Link to comment
https://forums.phpfreaks.com/topic/208185-byte/#findComment-1088704
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.