[Mono-bugs] [Bug 445366] New: saving tiff file produces corrupt file on osx-ppc

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Nov 14 19:50:21 EST 2008


https://bugzilla.novell.com/show_bug.cgi?id=445366


           Summary: saving tiff file produces corrupt file on osx-ppc
           Product: Mono: Class Libraries
           Version: 2.0
          Platform: PowerPC
        OS/Version: Mac OS X 10.4
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: libgdiplus
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: dan.shryock at gmail.com
         QAContact: mono-bugs at lists.ximian.com
                CC: dan.shryock at gmail.com
          Found By: Other


Saving a tiff file produces corrupted output on OSX 10.4 PPC.

I'm using the following code:

using System;
using System.Drawing;
using System.Drawing.Imaging;
public class Test{
       public static void Main(string[] args){
               using(var photo = new Bitmap(args[0])){
                       using(var output = new FileStream(args[0]+".tiff",
FileMode.Create)){
                               output.SetLength(0);
                               photo.Save(output,ImageFormat.Tiff);
                       }
               }
       }
}

The resulting tiff file is unreadable when produced by mono 2.0.1 on
osx-ppc, and works just fine using mono 1.9.1 on linux-x86.

When I compare the two files using "cmp -l good.tiff bad.tiff" the
output I receive is:
     1 111 115
     2 111 115
     3  52   0
     4   0  52
     5  10   0
     6 300   0
     7  22   0
    19  20 377
  2579  30 377
  5139  43 377
  7699  51 377
 10259  47 377
 12819  43 377
 15379  43 377
 17939  46 377
 20499   0 377
 23059 120 377
 25619 117 377
 28179  50 377
 30739  63 377
 33299  37 377
 35859   3 377
 38419  44 377
<<snip>>

The interesting thing is that after the first 7 bytes, the bad value
is always listed as 377, and the offset between bad bytes is 2560.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list