GraphicsMagick: coders/tga.c Remove autoorientation attempt in y...
GraphicsMagick Commits <[email protected]> Sat, 24 Feb 2024 11:45:41 -0600
| Newsgroups | gmane.comp.video.graphicsmagick.cvs |
|---|---|
| Message-ID | <mailman.9285.1708796776.1744.graphicsmagick-commit@lists.sourceforge.net> |
changeset b8d10b9024f2 in /hg/GraphicsMagick
details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=b8d10b9024f2
summary: coders/tga.c Remove autoorientation attempt in y axis from TGA reader. The newly commented code should be removed, cot conserved.
diffstat:
coders/tga.c | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diffs (60 lines):
diff -r 31b35b51cf7f -r b8d10b9024f2 coders/tga.c
--- a/coders/tga.c Sat Feb 24 16:54:17 2024 +0100
+++ b/coders/tga.c Sat Feb 24 18:45:23 2024 +0100
@@ -268,7 +268,6 @@
}
-
static int ValidateHeaderTGA(const TGAInfo *tga_info)
{
if (((tga_info->image_type != TGAColormap) &&
@@ -358,7 +357,7 @@
base,
flag,
offset,
- real,
+// real,
skip;
unsigned int
@@ -689,17 +688,17 @@
base=0;
flag=0;
skip=MagickFalse;
- real=0;
+// real=0;
index=0;
runlength=0;
offset=0;
pixel.opacity=OpaqueOpacity;
for (y=0; y < (long) image->rows; y++)
{
- real=offset;
- if (((tga_info.attributes & 0x20) >> 5) == 0)
- real=image->rows-real-1;
- q=SetImagePixels(image,0,(long) real,image->columns,1);
+// real=offset;
+// if (((tga_info.attributes & 0x20) >> 5) == 0)
+// real=image->rows-real-1;
+ q=SetImagePixels(image,0,(long)offset,image->columns,1);
if (q == (PixelPacket *) NULL)
break;
indexes=AccessMutableIndexes(image);
@@ -839,13 +838,15 @@
FIXME: Need to research what case was expected to be
tested here. This test case can never be true and so it
is commented out for the moment.
+ J.Fojtik - Looks like some form of interlacing, untested.
+ this testcase could be true based on image data.
if (((unsigned char) (tga_info.attributes & 0xc0) >> 6) == 4)
offset+=4;
else
*/
if (((unsigned char) (tga_info.attributes & 0xc0) >> 6) == 2)
- offset+=2;
+ offset+=2; /* J.Fojtik - please note that this also never triggers! */
else
offset++;
if (offset >= image->rows)