P
P
peregrinTuk2017-10-13 15:09:54
PHP
peregrinTuk, 2017-10-13 15:09:54

What is the picture format?

Hello uv. Community!
The image is stored in the ms sql database in the format (0xFFD8FFE000104A46494600010100000100010000FFDB ......), please tell me what is the format and what php function can it be converted to base64 or immediately to jpg?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
peregrinTuk, 2017-10-15
@peregrinTuk

Maybe someone needs a solution to this problem:

$img = "FFD8FFE000104A46494600010100000100010000......";
$data = base64_encode(pack('H*',$img));

A
Andrey Skorzhinsky, 2017-10-13
@AndyKorg

59e0b2cac13b1319002046.jpeg

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question