1 / 22

A bug in PhotoPlus

A bug in PhotoPlus. When PhotoPlus X2, version 12.0.2.11, is used to create a new .bmp file, it does not create the Pixel Data correctly

dawn
Télécharger la présentation

A bug in PhotoPlus

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A bug in PhotoPlus • When PhotoPlus X2, version 12.0.2.11, is used to create a new .bmp file, it does not create the Pixel Data correctly • This bug may have been removed in later versions of the package but we will consider it in some detail here, because it illustrates how frequently software packages have bugs or "features" which deviate from the standards they are supposed to follow

  2. Creating a new .bmp file in PhotoPlus • We are starting a new 4-by-4 image

  3. Creating a new .bmp file in PhotoPlus • We have just painted the pixels

  4. Creating a new .bmp file in PhotoPlus • We are just about to export the image to test4By4.bmp

  5. Viewing the new .bmp file in PhotoPlus • We are about to open the image we just created in test4By4.bmp

  6. Viewing the new .bmp file in PhotoPlus • The image in test4By4.bmp appears wrong when we open it • Let's try to view it in other programs

  7. Viewing the new .bmp file in MS Paint • The test4By4.bmp image also appears wrong in MS Paint

  8. Viewing the new .bmp file in Opera • The test4By4.bmp image also appears wrong in Opera

  9. Viewing the new .bmp file in Firefox • The test4By4.bmp image also appears wrong in Firefox

  10. Viewing the new .bmp file in XVI32 • It is easy to see that the image in test4By4.bmp is not what we stored • All the Pixel Data bytes are 00 • So they are pointing to the same entry in the Colour Table

  11. Creating an (almost) correct .bmp file in PhotoPlus • We cannot export a new correct .bmp file from PhotoPlus, but ... • When Photoplus imports a correct .bmp file (one created by another editor, including XVI32), it seems not to introduce errors when we subsequently export it • Also, when Photplus imports an almost correct .jpg file, it creates a correct .bmp file when we export the image as a .bmp

  12. Creating, indirectly, an (almost) correct .bmp file in PhotoPlus • We have just painted the pixels for a new image • We are about to export the image as .jpg file

  13. Creating, indirectly, an (almost) correct .bmp file in PhotoPlus • We have just opened the .jpg file containing the image we exported • The image looks correct • We are about to export the newly opened image as .bmp file

  14. Examining the (almost) correct .bmp file in PhotoPlus • We have just opened the newly exported .bmp file • It looks correct, but is it? • On the next slide, we will examine the .bmp file in XVI32

  15. Examining the (almost) correct .bmp file in XVI32 • The Pixel Data look correct • There are four sequences of four bytes • 00 00 00 00 01 01 01 01 00 00 00 00 01 01 01 01 • On the next slide, we will look at the Colour Table

  16. Examining the (almost) correct .bmp file in XVI32 • The Colour Table is not quite right • The Green is correct: 00 FF 00 00 • But the Red is slightly off: 00 00 FE 00 • This is a result of the sampling done when the .jpg file was exported • As we will see on the next slide, there is something else ...

  17. Examining the (almost) correct .bmp file in XVI32 • There is also a problem in the Info Header • The ColorsUsed and ColorsImportant fields are set to all zeros • This is wrong • ColoursUsed should 00 01 00 00 • ColorsImportant should be 02 00 00 00 • The fact that the .bmp file displays correctly in PhotoPlus, MS Paint and the various browsers just shows that these programs do not pay much attention to these two fields in the Info Header

  18. Correcting the (almost) correct .bmp file in XVI32 • We can correct the .bmp file by setting the bytes highlighted below to the values shown • Below, we have just saved the edited image in a file called test4By4newCorrected.bmp • On the next few slides, we will view this file in various programs

  19. Viewing the corrected .bmp file in PhotoPlus • Below, we have just opened the image in test4By4newCorrected.bmp in PhotoPlus • It looks fine

  20. Viewing the corrected .bmp file in MS Paint • Below, we have just opened the image in test4By4newCorrected.bmp in MS Paint • It looks fine

  21. Viewing the corrected .bmp file in Opera • Below, we have just opened the image in test4By4newCorrected.bmp in Opera • It looks fine

  22. Viewing the corrected .bmp file in Firefox • Below, we have just opened the image in test4By4newCorrected.bmp in Firefox • It looks fine

More Related