Hex to image using Imagick


Some software will encode and send images in hex format. This is not very useful for storing. The solution is to use php pack method to convert the data into a binary string. Then using Imagick you can easily read in the result of the pack and set compression, image format, and dimensions before rendering.