You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is somewhat of an edge case. Unlike in mspaint, the field in the header which tells the offset to the pixel data is ignored which results in rendering the data from the usual offset of 54 bytes. (EDIT: Or as I see now, rather the first position of the cursor after parsing all headers).
This is a BMP file which is purposefully deceitful as it contains two images. When the offset is ignored, the "hidden" text appears in the image. Otherwise it displays just a photo of ice. Opening it in mspaint looks like below. Opening it in jspaint shows the text.
Possible solution
Set location to the offset in the BMPDecoder class, scanImage function:
The problem
This is somewhat of an edge case. Unlike in mspaint, the field in the header which tells the offset to the pixel data is ignored which results in rendering the data from the usual offset of
54
bytes. (EDIT: Or as I see now, rather the first position of the cursor after parsing all headers).As you can see, the offset is already parsed:
jspaint/lib/bmp.js
Line 325 in 12a90c6
Example
This is a BMP file which is purposefully deceitful as it contains two images. When the offset is ignored, the "hidden" text appears in the image. Otherwise it displays just a photo of ice. Opening it in mspaint looks like below. Opening it in jspaint shows the text.
Possible solution
Set location to the offset in the
BMPDecoder
class,scanImage
function:The text was updated successfully, but these errors were encountered: