tiff2pdf.c: fix some whitespace problems in source
This commit is contained in:
parent
bb1ab756d6
commit
8fed45347e
@ -1030,14 +1030,14 @@ void t2p_validate(T2P* t2p){
|
||||
#endif
|
||||
#ifdef ZIP_SUPPORT
|
||||
if(t2p->pdf_defaultcompression==T2P_COMPRESS_ZIP){
|
||||
uint16 m=t2p->pdf_defaultcompressionquality%100;
|
||||
if(t2p->pdf_defaultcompressionquality/100 > 9 ||
|
||||
(m>1 && m<10) || m>15){
|
||||
t2p->pdf_defaultcompressionquality=0;
|
||||
uint16 m=t2p->pdf_defaultcompressionquality%100;
|
||||
if(t2p->pdf_defaultcompressionquality/100 > 9 ||
|
||||
(m>1 && m<10) || m>15){
|
||||
t2p->pdf_defaultcompressionquality=0;
|
||||
}
|
||||
if(t2p->pdf_defaultcompressionquality%100 !=0){
|
||||
t2p->pdf_defaultcompressionquality/=100;
|
||||
t2p->pdf_defaultcompressionquality*=100;
|
||||
t2p->pdf_defaultcompressionquality/=100;
|
||||
t2p->pdf_defaultcompressionquality*=100;
|
||||
TIFFError(
|
||||
TIFF2PDF_MODULE,
|
||||
"PNG Group predictor differencing not implemented, assuming compression quality %u",
|
||||
@ -2137,7 +2137,7 @@ void t2p_read_tiff_size_tile(T2P* t2p, TIFF* input, ttile_t tile){
|
||||
k=tbc[tile];
|
||||
#ifdef OJPEG_SUPPORT
|
||||
if(t2p->tiff_compression==COMPRESSION_OJPEG){
|
||||
k = checkAdd64(k, 2048, t2p);
|
||||
k = checkAdd64(k, 2048, t2p);
|
||||
}
|
||||
#endif
|
||||
#ifdef JPEG_SUPPORT
|
||||
@ -2275,8 +2275,8 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){
|
||||
_TIFFmalloc(t2p->tiff_datasize);
|
||||
if (buffer == NULL) {
|
||||
TIFFError(TIFF2PDF_MODULE,
|
||||
"Can't allocate %lu bytes of memory for "
|
||||
"t2p_readwrite_pdf_image, %s",
|
||||
"Can't allocate %lu bytes of memory for "
|
||||
"t2p_readwrite_pdf_image, %s",
|
||||
(unsigned long) t2p->tiff_datasize,
|
||||
TIFFFileName(input));
|
||||
t2p->t2p_error = T2P_ERR_ERROR;
|
||||
@ -2305,7 +2305,7 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){
|
||||
_TIFFmalloc(t2p->tiff_datasize);
|
||||
if(buffer == NULL){
|
||||
TIFFError(TIFF2PDF_MODULE,
|
||||
"Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s",
|
||||
"Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s",
|
||||
(unsigned long) t2p->tiff_datasize,
|
||||
TIFFFileName(input));
|
||||
t2p->t2p_error = T2P_ERR_ERROR;
|
||||
@ -2332,7 +2332,7 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){
|
||||
_TIFFmalloc(t2p->tiff_datasize);
|
||||
if(buffer == NULL) {
|
||||
TIFFError(TIFF2PDF_MODULE,
|
||||
"Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s",
|
||||
"Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s",
|
||||
(unsigned long) t2p->tiff_datasize,
|
||||
TIFFFileName(input));
|
||||
t2p->t2p_error = T2P_ERR_ERROR;
|
||||
@ -2399,7 +2399,7 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){
|
||||
} else {
|
||||
if(! t2p->pdf_ojpegdata){
|
||||
TIFFError(TIFF2PDF_MODULE,
|
||||
"No support for OJPEG image %s with bad tables",
|
||||
"No support for OJPEG image %s with bad tables",
|
||||
TIFFFileName(input));
|
||||
t2p->t2p_error = T2P_ERR_ERROR;
|
||||
return(0);
|
||||
@ -2408,7 +2408,7 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){
|
||||
_TIFFmalloc(t2p->tiff_datasize);
|
||||
if(buffer==NULL){
|
||||
TIFFError(TIFF2PDF_MODULE,
|
||||
"Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s",
|
||||
"Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s",
|
||||
(unsigned long) t2p->tiff_datasize,
|
||||
TIFFFileName(input));
|
||||
t2p->t2p_error = T2P_ERR_ERROR;
|
||||
@ -2457,7 +2457,7 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){
|
||||
_TIFFmalloc(t2p->tiff_datasize);
|
||||
if(buffer==NULL){
|
||||
TIFFError(TIFF2PDF_MODULE,
|
||||
"Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s",
|
||||
"Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s",
|
||||
(unsigned long) t2p->tiff_datasize,
|
||||
TIFFFileName(input));
|
||||
t2p->t2p_error = T2P_ERR_ERROR;
|
||||
@ -2479,7 +2479,7 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){
|
||||
_TIFFmalloc(max_striplength);
|
||||
if(stripbuffer==NULL){
|
||||
TIFFError(TIFF2PDF_MODULE,
|
||||
"Can't allocate %u bytes of memory for t2p_readwrite_pdf_image, %s",
|
||||
"Can't allocate %u bytes of memory for t2p_readwrite_pdf_image, %s",
|
||||
max_striplength,
|
||||
TIFFFileName(input));
|
||||
_TIFFfree(buffer);
|
||||
@ -2521,7 +2521,7 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){
|
||||
buffer = (unsigned char*) _TIFFmalloc(t2p->tiff_datasize);
|
||||
if(buffer==NULL){
|
||||
TIFFError(TIFF2PDF_MODULE,
|
||||
"Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s",
|
||||
"Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s",
|
||||
(unsigned long) t2p->tiff_datasize,
|
||||
TIFFFileName(input));
|
||||
t2p->t2p_error = T2P_ERR_ERROR;
|
||||
@ -2559,7 +2559,7 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){
|
||||
buffer = (unsigned char*) _TIFFmalloc(t2p->tiff_datasize);
|
||||
if(buffer==NULL){
|
||||
TIFFError(TIFF2PDF_MODULE,
|
||||
"Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s",
|
||||
"Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s",
|
||||
(unsigned long) t2p->tiff_datasize,
|
||||
TIFFFileName(input));
|
||||
t2p->t2p_error = T2P_ERR_ERROR;
|
||||
@ -2569,7 +2569,7 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){
|
||||
samplebuffer = (unsigned char*) _TIFFmalloc(stripsize);
|
||||
if(samplebuffer==NULL){
|
||||
TIFFError(TIFF2PDF_MODULE,
|
||||
"Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s",
|
||||
"Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s",
|
||||
(unsigned long) t2p->tiff_datasize,
|
||||
TIFFFileName(input));
|
||||
t2p->t2p_error = T2P_ERR_ERROR;
|
||||
@ -2586,7 +2586,7 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){
|
||||
TIFFmin(sepstripsize, stripsize - samplebufferoffset));
|
||||
if(read==-1){
|
||||
TIFFError(TIFF2PDF_MODULE,
|
||||
"Error on decoding strip %u of %s",
|
||||
"Error on decoding strip %u of %s",
|
||||
i + j*stripcount,
|
||||
TIFFFileName(input));
|
||||
_TIFFfree(buffer);
|
||||
@ -2609,7 +2609,7 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){
|
||||
buffer = (unsigned char*) _TIFFmalloc(t2p->tiff_datasize);
|
||||
if(buffer==NULL){
|
||||
TIFFError(TIFF2PDF_MODULE,
|
||||
"Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s",
|
||||
"Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s",
|
||||
(unsigned long) t2p->tiff_datasize,
|
||||
TIFFFileName(input));
|
||||
t2p->t2p_error = T2P_ERR_ERROR;
|
||||
@ -3050,7 +3050,7 @@ tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output, ttile_
|
||||
if(buffer==NULL){
|
||||
TIFFError(TIFF2PDF_MODULE,
|
||||
"Can't allocate %lu bytes of memory "
|
||||
"for t2p_readwrite_pdf_image_tile, %s",
|
||||
"for t2p_readwrite_pdf_image_tile, %s",
|
||||
(unsigned long) t2p->tiff_datasize,
|
||||
TIFFFileName(input));
|
||||
t2p->t2p_error = T2P_ERR_ERROR;
|
||||
@ -3061,7 +3061,7 @@ tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output, ttile_
|
||||
if(samplebuffer==NULL){
|
||||
TIFFError(TIFF2PDF_MODULE,
|
||||
"Can't allocate %lu bytes of memory "
|
||||
"for t2p_readwrite_pdf_image_tile, %s",
|
||||
"for t2p_readwrite_pdf_image_tile, %s",
|
||||
(unsigned long) t2p->tiff_datasize,
|
||||
TIFFFileName(input));
|
||||
_TIFFfree(buffer);
|
||||
@ -3102,7 +3102,7 @@ tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output, ttile_
|
||||
if(buffer==NULL){
|
||||
TIFFError(TIFF2PDF_MODULE,
|
||||
"Can't allocate %lu bytes of memory "
|
||||
"for t2p_readwrite_pdf_image_tile, %s",
|
||||
"for t2p_readwrite_pdf_image_tile, %s",
|
||||
(unsigned long) t2p->tiff_datasize,
|
||||
TIFFFileName(input));
|
||||
t2p->t2p_error = T2P_ERR_ERROR;
|
||||
@ -3277,15 +3277,15 @@ tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output, ttile_
|
||||
t2p_enable(output);
|
||||
t2p->outputwritten = 0;
|
||||
bufferoffset = TIFFWriteEncodedStrip(output, (tstrip_t) 0, buffer,
|
||||
TIFFStripSize(output));
|
||||
TIFFStripSize(output));
|
||||
if (buffer != NULL) {
|
||||
_TIFFfree(buffer);
|
||||
buffer = NULL;
|
||||
}
|
||||
if (bufferoffset == -1) {
|
||||
TIFFError(TIFF2PDF_MODULE,
|
||||
"Error writing encoded tile to output PDF %s",
|
||||
TIFFFileName(output));
|
||||
"Error writing encoded tile to output PDF %s",
|
||||
TIFFFileName(output));
|
||||
t2p->t2p_error = T2P_ERR_ERROR;
|
||||
return(0);
|
||||
}
|
||||
@ -4967,7 +4967,7 @@ tsize_t t2p_write_pdf_xobject_stream_dict(ttile_t tile,
|
||||
} while(0)
|
||||
|
||||
/*
|
||||
* This function writes a PDF Image XObject Colorspace name to output.
|
||||
* This function writes a PDF Image XObject Colorspace name to output.
|
||||
*/
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user