]> granicus.if.org Git - imagemagick/commitdiff
Increase the offset by 12 when the compression is BI_BITFIELDS and the format is...
authorDirk Lemstra <dirk@lemstra.org>
Fri, 4 Oct 2019 12:10:34 +0000 (14:10 +0200)
committerDirk Lemstra <dirk@lemstra.org>
Fri, 4 Oct 2019 12:10:34 +0000 (14:10 +0200)
coders/clipboard.c

index e84ab98a1a98155874144f5f87a2c840d2918999..4374dc2e289533cad882f3bca979ef1666661859 100644 (file)
@@ -187,6 +187,8 @@ static Image *ReadCLIPBOARDImage(const ImageInfo *image_info,
   (void) CloseClipboard();
   memset(clip_data,0,BMP_HEADER_SIZE);
   offset=p[0]+BMP_HEADER_SIZE;
+  if ((p[0] == 40) && (p[16] == BI_BITFIELDS))
+    offset+=12;
   p-=BMP_HEADER_SIZE;
   p[0]='B';
   p[1]='M';