[CSHARP-711] BitmapSerializer needs to be removed as not all formats can be consistently round tripped Created: 25/Mar/13  Updated: 02/Apr/15  Resolved: 08/May/14

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: 1.8
Fix Version/s: 2.0

Type: Bug Priority: Major - P3
Reporter: Sridhar Nanjundeswaran Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File CSharp355New.cs    

 Description   

Roundtripping of Bitmap does not always work. It is dependent on PixelFormat, save type (Bmp vs Tiff) and platform.

With the attached tests (CSharp355New), ignoring the unsupported formats:
The following fail on Windows with save type as Bmp

  • TestBitmapFormat16bppRgb555
  • TestBitmapFormat16bppRgb565
  • TestBitmapFormat48bppRgb
    On Mono on 2.10.1 on OS X with save type as Bmp
    The above 3 pass but the following had to be skipped since they were unsupported
  • TestBitmapFormat16bppArgb1555
  • TestBitmapFormat48bppRgb
  • TestBitmapFormat64bppArgb
  • TestBitmapFormat64bppPArgb

If you change the save type to be ImageFormat.Tiff on line 40 of the attached test and line 145 of BitmapSerializer all tests (except the skipped one) passed on Windows.



 Comments   
Comment by Robert Stam [ 08/May/14 ]

This was already completed while working on another JIRA ticket. See commit:

https://github.com/mongodb/mongo-csharp-driver/commit/5d7dcb86fe369a9d2147bd793aae40f65230f2d5

Generated at Wed Feb 07 21:37:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.