diff options
| author | Danilo Egea Gondolfo <danilo@FreeBSD.org> | 2014-06-20 17:17:54 +0000 |
|---|---|---|
| committer | Danilo Egea Gondolfo <danilo@FreeBSD.org> | 2014-06-20 17:17:54 +0000 |
| commit | ce3d606a5b5d25c1a7fa7e2f2ddb75a284d17941 (patch) | |
| tree | da56af4d8dbe76ea4db95f5ac25d17feb92aaabd /graphics/pfstools/files/patch-src-fileformat-hdrtiffio.cpp | |
| parent | - Update to 1.0.7 (diff) | |
- Update from 1.6.4 to 1.8.5 [1]
- Use options helpers
PR: ports/191179
Submitted by: ii@any.com.ru [1]
Notes
Notes:
svn path=/head/; revision=358615
Diffstat (limited to 'graphics/pfstools/files/patch-src-fileformat-hdrtiffio.cpp')
| -rw-r--r-- | graphics/pfstools/files/patch-src-fileformat-hdrtiffio.cpp | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/graphics/pfstools/files/patch-src-fileformat-hdrtiffio.cpp b/graphics/pfstools/files/patch-src-fileformat-hdrtiffio.cpp new file mode 100644 index 000000000000..fbfe58ab08b2 --- /dev/null +++ b/graphics/pfstools/files/patch-src-fileformat-hdrtiffio.cpp @@ -0,0 +1,96 @@ +--- src/fileformat/hdrtiffio.cpp.orig 2011-10-27 08:39:07.000000000 +0000 ++++ src/fileformat/hdrtiffio.cpp 2014-02-20 19:04:01.546588828 +0000 +@@ -66,7 +66,7 @@ + } + + DEBUG_STR << "TIFF file \"" << filename << "\" (" +- << width << "x" << height << ")" << endl; ++ << width << "x" << height << ")" << std::endl; + + //--- image parameters + if(!TIFFGetField(tif, TIFFTAG_COMPRESSION, &comp)) // compression type +@@ -81,7 +81,7 @@ + switch(phot) + { + case PHOTOMETRIC_LOGLUV: +- DEBUG_STR << "Photometric data: LogLuv" << endl; ++ DEBUG_STR << "Photometric data: LogLuv" << std::endl; + if (comp != COMPRESSION_SGILOG && comp != COMPRESSION_SGILOG24) + { + TIFFClose(tif); +@@ -96,7 +96,7 @@ + relative_values=true; + break; + case PHOTOMETRIC_RGB: +- DEBUG_STR << "Photometric data: RGB" << endl; ++ DEBUG_STR << "Photometric data: RGB" << std::endl; + // read extra samples (# of alpha channels) + if (TIFFGetField( tif, TIFFTAG_EXTRASAMPLES, + &extra_samples_per_pixel, &extra_sample_types )!=1) +@@ -121,36 +121,36 @@ + if( bps==8 ) + { + TypeOfData = BYTE; +- DEBUG_STR << "8bit per channel" << endl; ++ DEBUG_STR << "8bit per channel" << std::endl; + strcpy(format_string,"linear 8bit RGB"); + relative_values=false; //!! TODO: verify if 8bit is always gamma corrected + } + else if( bps==16 ) + { + TypeOfData = WORD; +- DEBUG_STR << "16bit per channel" << endl; ++ DEBUG_STR << "16bit per channel" << std::endl; + strcpy(format_string,"linear 16bit RGB"); + relative_values=true; //!! TODO: verify this case!! + } + else + { + TypeOfData = FLOAT; +- DEBUG_STR << "32bit float per channel" << endl; ++ DEBUG_STR << "32bit float per channel" << std::endl; + strcpy(format_string,"linear 32bit float RGB"); + relative_values=true; + } + break; + case PHOTOMETRIC_MINISBLACK: // HDR video camera format (grayscale) +- DEBUG_STR << "Photometric data: MINISBLACK (hdrv camera)" << endl; ++ DEBUG_STR << "Photometric data: MINISBLACK (hdrv camera)" << std::endl; + if (!TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &bps) || !bps==1) + { + TIFFClose(tif); + throw pfs::Exception("TIFF: Unsupported samples per pixel for " + "grayscale image"); + } +- if (!TIFFGetField(tif, TIFFTAG_BITSPERSAMPLE, &bps) || !bps==16) ++ if (!TIFFGetField(tif, TIFFTAG_BITSPERSAMPLE, &bps) || !(bps==16)) + { +- DEBUG_STR << "Detected bits per sample: " << bps << endl; ++ DEBUG_STR << "Detected bits per sample: " << bps << std::endl; + TIFFClose(tif); + throw pfs::Exception("TIFF: unsupported bits per sample for " + "grayscale image."); +@@ -160,7 +160,7 @@ + relative_values=true; + break; + default: +- DEBUG_STR << "Unsupported photometric type: " << phot << endl; ++ DEBUG_STR << "Unsupported photometric type: " << phot << std::endl; + TIFFClose(tif); + strcpy(format_string,"unknown"); + relative_values=false; +@@ -184,12 +184,12 @@ + //--- image length + uint32 imagelength; + TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &imagelength); +- DEBUG_STR << "Image length: " << imagelength << endl; ++ DEBUG_STR << "Image length: " << imagelength << std::endl; + + //--- image scanline size + uint32 scanlinesize = TIFFScanlineSize(tif); + buf.vp = _TIFFmalloc(scanlinesize); +-// DEBUG_STR << "Scanline size: " << scanlinesize << endl; ++// DEBUG_STR << "Scanline size: " << scanlinesize << std::endl; + + + //--- read scan lines |
