TIFFWriteDirectory() fails on network drive

Corinna Vinschen corinna-cygwin@cygwin.com
Fri Jan 31 20:38:00 GMT 2014


On Jan 31 14:17, Hsu, Justine wrote:
> The attached program tries to save a blank 64 x 64 TIFF image to specified path.
> When the path specified is local, the images saves fine.
> If the path is on a network drive on a Windows7, then it saves a corrupt file, even after applying this hotfix http://support.microsoft.com/kb/2732673 
> Here is the relevant code:
> 
>         const int dim = 64;
>         const int channels = 3;
> 
>         TIFF *tif = TIFFOpen(argv[1], "w");
>         TIFFSetField(tif, TIFFTAG_IMAGEWIDTH,      dim);
>         TIFFSetField(tif, TIFFTAG_IMAGELENGTH,     dim);
>         TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, channels);
>         TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP,    1);
>         TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE,   8);
>         TIFFSetField(tif, TIFFTAG_PLANARCONFIG,    1);
>         TIFFSetField(tif, TIFFTAG_PHOTOMETRIC,     PHOTOMETRIC_RGB);
>         TIFFSetField(tif, TIFFTAG_COMPRESSION,     COMPRESSION_LZW);
>         
>         int i;
>         for (i = 0; i < dim; i++)
>         {
>             TIFFWriteScanline(tif, buf + dim*channels*(dim - i - 1), i, 0);
>         }
> 
>         TIFFWriteDirectory(tif);
>         TIFFClose(tif);

And this question is is Cygwin-related, because...?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20140131/0ada8348/attachment.sig>


More information about the Cygwin mailing list