View Issue Details

IDProjectCategoryView StatusLast Update
0000555fileGeneralpublic2024-11-09 23:32
Reporterjsummers Assigned Tochristos  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version5.45 
Fixed in Version5.46 
Summary0000555: Issues with Lytro Light Field Picture pattern
DescriptionRegarding the "Light Field Picture" pattern from magic/Magdir/images as of 2024-08-25...

An insufficient number of ">"s causes bytes 4-7 of the 8-byte PNG-inspired signature to be ignored, and also makes it possible for the version number to be printed without the format name.
Steps To Reproduce$ echo -en '\x89LFP\x0d\x0a\x1a\x0a\x00\x00\x00\x01\x00\x00\x00\x00' > 1lfp.dat
$ echo -en '\x89LFP\xff\xff\xff\xff\x00\x00\x00\x01\x00\x00\x00\x00' > 2notlfp.dat
$ echo -en '\x89LFP\x0d\x0a\x1a\x0a\x00\x00\xff\xff\xff\xff\xff\xff' > 3maybelfp.dat
$ file *.dat
1lfp.dat: Lytro Light Field Picture, version 1
2notlfp.dat: Lytro Light Field Picture, version 1
3maybelfp.dat: , version 65535

Expected results:

$ file -m lfp-new.magic *.dat
1lfp.dat: Lytro Light Field Picture, version 1
2notlfp.dat: data
3maybelfp.dat: Lytro Light Field Picture, version 65535

The correct result for 3maybelfp.dat is debatable. I think testing the bytes at offset 12 is overkill.
Additional Information[Found using Mgchkj <https://github.com/jsummers/mgchkj>.]

The attached file contains my suggested replacement pattern.

Format info: http://optics.miloush.net/lytro/TheFileFormat.aspx

Some example files: http://lightfield-forum.com/2012/08/lytro-sample-lfp-files-for-download/
TagsNo tags attached.

Activities

jsummers

2024-08-26 17:22

reporter  

file-lfp.zip (1,182 bytes)

christos

2024-11-09 23:32

manager   ~0004085

Fixed, thanks!

Issue History

Date Modified Username Field Change
2024-08-26 17:22 jsummers New Issue
2024-08-26 17:22 jsummers File Added: file-lfp.zip
2024-11-09 23:31 christos Assigned To => christos
2024-11-09 23:31 christos Status new => assigned
2024-11-09 23:32 christos Status assigned => resolved
2024-11-09 23:32 christos Resolution open => fixed
2024-11-09 23:32 christos Fixed in Version => 5.46
2024-11-09 23:32 christos Note Added: 0004085