marcel icon indicating copy to clipboard operation
marcel copied to clipboard

Add support for Sony RAW image format magic detection

Open bogdan opened this issue 1 month ago • 0 comments

image/x-raw-sony is a proprietary extension of image/tiff produced by Sony camera with .arw extension. This PR implements the detection of mime type based on file content (not just extension).

I had a lot of problems finding a sample .arw file of small size. The one inside the repo is not quite real .arw file produced by camera: it is lacking SONY tag and can not be used for "magic" detection.

Because this is proprietary format, it can only be produced by Sony camera and they provide some samples, but the smallest I found was 16MB. So, I just truncated a file to be smaller and put it to the repo. It can not be opened by image view software, but its first 8KB are enough for mime type detection.

bogdan avatar Dec 12 '25 15:12 bogdan