ImageDecoder::GetImageInfoで取得されるGIF画像の解像度が正しくないのを修正 #1172
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
下記の不具合を修正しました。ご確認をお願いいたします。
不具合内容
ImageDecoder::GetImageInfo
でGIF画像の解像度を取得すると、ImageInfo::size
に必ず「18759px×14406px」が取得されており、結果が正しくない。不具合原因
本来7・8バイト目を幅、9・10バイト目を高さとして取り扱うべきところが、それぞれ1・2バイト目、3・4バイト目が読み込まれていた。
GIFファイルのヘッダの先頭4バイトは毎回同じデータ("
GIF8
")なので、毎回同じ結果(18759px×14406px)となっていた。修正内容
先頭10バイトを読み込んで、7・8バイト目を幅、9・10バイト目を高さとして取り扱うよう修正。