Skip to content

Commit

Permalink
Fix to TPTImage string concatenation bug, elimination of type warning…
Browse files Browse the repository at this point in the history
…s and documentation updates
  • Loading branch information
ruven committed Jan 14, 2025
1 parent acb4335 commit 0579e74
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
14/01/2025:
- Fix to TPTImage string concatenation bug, elimination of type warnings and documentation updates


20/11/2024:
- Added TIFF output support for both regions (CVT=TIFF) and tiles (TTL=<resolution>,<tile number>). TIFF
encoder handles all bit depths, alpha channels, ICC profiles and basic TIFF and XMP metadata.
Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -519,4 +519,4 @@ This can work in conjunction with debugging mode or together with a web server i
Please refer to the project site https://iipimage.sourceforge.io for further details

------------------------------------------------------------------------------------
(c) 2000-2024 Ruven Pillay <[email protected]>
(c) 2000-2025 Ruven Pillay <[email protected]>
8 changes: 6 additions & 2 deletions man/iipsrv.8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH IIPSRV 8 "October 2024" "Ruven Pillay"
.TH IIPSRV 8 "January 2025" "Ruven Pillay"
.SH NAME

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

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.
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.

.SH SYNOPSIS

Expand Down Expand Up @@ -55,6 +55,10 @@ The level of logging. 0 means no logging, 1 is minimal logging,
a very large amount indeed. Logging is only enabled if
.BR LOGFILE
has also been defined.
.IP TIFF_COMPRESSION
The default compression encoder for TIFF output. 0 = None, 1 = LZW, 2 = Deflate, 3 = JPEG, 4 = WebP, 5 = ZStandard. The default is 2 (Deflate).
.IP TIFF_QUALITY
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.
.IP JPEG_QUALITY
The default JPEG quality factor for compression when the client
does not specify one. The value should be between 1 (highest level
Expand Down
6 changes: 4 additions & 2 deletions src/TPTImage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/* IIP Server: Tiled Pyramidal TIFF handler
Copyright (C) 2000-2024 Ruven Pillay.
Copyright (C) 2000-2025 Ruven Pillay.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -543,7 +543,9 @@ RawTile TPTImage::getTile( int x, int y, unsigned int res, int layers, unsigned
// which returns an array of all tile sizes in current IFD
uint64_t *bytecounts;
if( !TIFFGetField( tiff, TIFFTAG_TILEBYTECOUNTS, &bytecounts ) ){
throw file_error( "TPTImage :: Unable to get byte count for tile " + tile );
ostringstream error;
error << "TPTImage :: Unable to get byte count for tile " << tile;
throw file_error( error.str() );
}
bytes = bytecounts[tile];
if( IIPImage::logging ) logfile << "TPTImage :: Byte count for compressed tile: " << bytes << endl;
Expand Down
4 changes: 2 additions & 2 deletions src/View.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
View Member Functions
Copyright (C) 2004-2024 Ruven Pillay.
Copyright (C) 2004-2025 Ruven Pillay.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -88,7 +88,7 @@ unsigned int View::getResolution(){
dimension = (int) (res_height*view_height*scale);
}

while( resolution > 0 && ( dimension > (unsigned int) max_size ) ){
while( resolution > 0 && ( dimension > max_size ) ){
dimension = (int) (dimension/2.0);
res_width = (int) floor(res_width/2.0);
res_height = (int) floor(res_height/2.0);
Expand Down

0 comments on commit 0579e74

Please sign in to comment.