Skip to content

Commit 0579e74

Browse files
committed
Fix to TPTImage string concatenation bug, elimination of type warnings and documentation updates
1 parent acb4335 commit 0579e74

File tree

5 files changed

+17
-7
lines changed

5 files changed

+17
-7
lines changed

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
14/01/2025:
2+
- Fix to TPTImage string concatenation bug, elimination of type warnings and documentation updates
3+
4+
15
20/11/2024:
26
- Added TIFF output support for both regions (CVT=TIFF) and tiles (TTL=<resolution>,<tile number>). TIFF
37
encoder handles all bit depths, alpha channels, ICC profiles and basic TIFF and XMP metadata.

README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,4 +519,4 @@ This can work in conjunction with debugging mode or together with a web server i
519519
Please refer to the project site https://iipimage.sourceforge.io for further details
520520

521521
------------------------------------------------------------------------------------
522-
(c) 2000-2024 Ruven Pillay <ruven@users.sourceforge.net>
522+
(c) 2000-2025 Ruven Pillay <ruven@users.sourceforge.net>

man/iipsrv.8

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH IIPSRV 8 "October 2024" "Ruven Pillay"
1+
.TH IIPSRV 8 "January 2025" "Ruven Pillay"
22
.SH NAME
33

44
IIPSRV \- IIPImage Image Server
@@ -9,7 +9,7 @@ images. It is designed to be fast and bandwidth-efficient with low processor and
99
well as advanced image features such as 8, 16 and 32 bit depths, CIELAB colorimetric images and scientific imagery such as multispectral images.
1010
Source images can be either TIFF (tiled multi-resolution), JPEG or JPEG2000 (if enabled).
1111

12-
The image server can also dynamically export images in JPEG, PNG, WebP and AVIF format and perform basic image processing, such as contrast adjustment, gamma control, conversion from color to greyscale, color twist, region extraction and arbitrary rescaling. The server can also export spectral point or profile data from multispectral data and apply color maps or perform hillshading rendering.
12+
The image server can also dynamically export images in JPEG, PNG, WebP, AVIF and TIFF format and perform basic image processing, such as contrast adjustment, gamma control, conversion from color to greyscale, color twist, region extraction and arbitrary rescaling. The server can also export spectral point or profile data from multispectral data and apply color maps or perform hillshading rendering.
1313

1414
.SH SYNOPSIS
1515

@@ -55,6 +55,10 @@ The level of logging. 0 means no logging, 1 is minimal logging,
5555
a very large amount indeed. Logging is only enabled if
5656
.BR LOGFILE
5757
has also been defined.
58+
.IP TIFF_COMPRESSION
59+
The default compression encoder for TIFF output. 0 = None, 1 = LZW, 2 = Deflate, 3 = JPEG, 4 = WebP, 5 = ZStandard. The default is 2 (Deflate).
60+
.IP TIFF_QUALITY
61+
The default quality factor for compression when the client does not specify one. When using JPEG or WebP, value should be 0-100. For Deflate 1-9. For ZStandard 1-19. The default is 1.
5862
.IP JPEG_QUALITY
5963
The default JPEG quality factor for compression when the client
6064
does not specify one. The value should be between 1 (highest level

src/TPTImage.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/* IIP Server: Tiled Pyramidal TIFF handler
44
5-
Copyright (C) 2000-2024 Ruven Pillay.
5+
Copyright (C) 2000-2025 Ruven Pillay.
66
77
This program is free software; you can redistribute it and/or modify
88
it under the terms of the GNU General Public License as published by
@@ -543,7 +543,9 @@ RawTile TPTImage::getTile( int x, int y, unsigned int res, int layers, unsigned
543543
// which returns an array of all tile sizes in current IFD
544544
uint64_t *bytecounts;
545545
if( !TIFFGetField( tiff, TIFFTAG_TILEBYTECOUNTS, &bytecounts ) ){
546-
throw file_error( "TPTImage :: Unable to get byte count for tile " + tile );
546+
ostringstream error;
547+
error << "TPTImage :: Unable to get byte count for tile " << tile;
548+
throw file_error( error.str() );
547549
}
548550
bytes = bytecounts[tile];
549551
if( IIPImage::logging ) logfile << "TPTImage :: Byte count for compressed tile: " << bytes << endl;

src/View.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
View Member Functions
33
4-
Copyright (C) 2004-2024 Ruven Pillay.
4+
Copyright (C) 2004-2025 Ruven Pillay.
55
66
This program is free software; you can redistribute it and/or modify
77
it under the terms of the GNU General Public License as published by
@@ -88,7 +88,7 @@ unsigned int View::getResolution(){
8888
dimension = (int) (res_height*view_height*scale);
8989
}
9090

91-
while( resolution > 0 && ( dimension > (unsigned int) max_size ) ){
91+
while( resolution > 0 && ( dimension > max_size ) ){
9292
dimension = (int) (dimension/2.0);
9393
res_width = (int) floor(res_width/2.0);
9494
res_height = (int) floor(res_height/2.0);

0 commit comments

Comments
 (0)