File fotoxx-tiffsave.patch of Package fotoxx

--- f.file.cc.orig	2015-03-19 15:03:40.061609291 +0100
+++ f.file.cc	2015-03-19 15:11:49.107648423 +0100
@@ -2570,7 +2570,19 @@ int f_save(char *outfile, cchar *outype,
    if (err && Fack)                                                        //    temp file with above revisions
       zmessageACK(Mwin,0,ZTX("Unable to copy EXIF/IPTC data"));
 
-   err = rename(tempfile,outfile);                                         //  rename temp file to output file
+//   err = rename(tempfile,outfile);                                         //  rename temp file to output file    v.13.12   
+   snprintf(command,ccc,"tiffcp -s -r 1 -c zip:p9 \"%s\" \"%s\" ",tempfile,outfile);  //  tiffcopy temp file to outfile
+   err = system(command);
+   if (err) {
+      if (Fack) zmessageACK(Mwin,0,wstrerror(err));
+      remove(tempfile);                                                    //  delete temp file
+      free(tempfile);
+      Ffuncbusy = 0;
+      return 2;                                                            //  could not save
+   }
+
+   snprintf(command,ccc,"rm -f \"%s\" ",tempfile);                         //  remove temp file1
+   err = system(command);
    if (err) {
       if (Fack) zmessageACK(Mwin,0,wstrerror(err));
       remove(tempfile);                                                    //  delete temp file
@@ -3048,7 +3060,7 @@ int PXM_TIFF_save(PXM *pxm, cchar *file,
    float       *pix;
    int         tiffstat = 0;
    int         ww, hh, row, col, rowcc;                                    //  int not uint
-   int         nch, pm = 2, pc = 1, comp = 5;
+   int         nch, pm = 2, pc = 1, comp = 32946;
    char        *tiffbuff;
 
    if (ftf) {
@@ -3074,7 +3086,8 @@ int PXM_TIFF_save(PXM *pxm, cchar *file,
    TIFFSetField(tiff, TIFFTAG_SAMPLESPERPIXEL, nch);
    TIFFSetField(tiff, TIFFTAG_PHOTOMETRIC, pm);                            //  RGB
    TIFFSetField(tiff, TIFFTAG_PLANARCONFIG, pc);
-   TIFFSetField(tiff, TIFFTAG_COMPRESSION, comp);                          //  LZW
+   TIFFSetField(tiff, TIFFTAG_COMPRESSION, comp);                          //  Deflate
+   TIFFSetField(tiff, TIFFTAG_ZIPQUALITY, 1);                              //  Deflate Level 1
 
    rowcc = TIFFScanlineSize(tiff);
    tiffbuff = (char*) zmalloc(rowcc);
openSUSE Build Service is sponsored by