mirror of
https://github.com/sdsykes/fastimage.git
synced 2025-12-30 00:05:02 -05:00
Remove parsing of IFDs other than IFD0 in EXIF, IFD0 should have everything needed. Caused incorrect orientation in certain jpegs
This commit is contained in:
parent
5aaa16fb4b
commit
327a3b55cd
@ -475,13 +475,6 @@ class FastImage
|
||||
end
|
||||
@stream.read(2)
|
||||
end
|
||||
|
||||
next_offset = @stream.read(4).unpack(@long)[0]
|
||||
relative_offset = next_offset - (@stream.pos - @start_byte)
|
||||
if relative_offset >= 0
|
||||
@stream.read(relative_offset)
|
||||
parse_exif_ifd
|
||||
end
|
||||
end
|
||||
|
||||
def parse_exif
|
||||
|
||||
BIN
test/fixtures/exif_orientation.jpg
vendored
BIN
test/fixtures/exif_orientation.jpg
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 134 KiB |
BIN
test/fixtures/orient_2.jpg
vendored
Normal file
BIN
test/fixtures/orient_2.jpg
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
@ -22,8 +22,9 @@ GoodFixtures = {
|
||||
"test.tiff"=>[:tiff, [85, 67]],
|
||||
"test2.tiff"=>[:tiff, [333, 225]],
|
||||
"test.psd"=>[:psd, [17, 32]],
|
||||
"exif_orientation.jpg"=>[:jpeg, [2448, 3264]],
|
||||
"infinite.jpg"=>[:jpeg, [160,240]]
|
||||
"exif_orientation.jpg"=>[:jpeg, [600, 450]],
|
||||
"infinite.jpg"=>[:jpeg, [160,240]],
|
||||
"orient_2.jpg"=>[:jpeg, [230,408]]
|
||||
}
|
||||
|
||||
BadFixtures = [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user