Skip to content

Commit

Permalink
Fix to calculation of DPI in pixels/m when returned in IIP OBJ request
Browse files Browse the repository at this point in the history
  • Loading branch information
ruven committed Jan 25, 2024
1 parent d22556c commit f88a826
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
25/01/2024:
- Fix to calculation of DPI in pixels/m when returned in IIP OBJ request


16/01/2024:
- Added ability to specify lossless WebP compression by specifying a quality factor of -1

Expand Down
4 changes: 2 additions & 2 deletions src/IIPImage.h
Original file line number Diff line number Diff line change
Expand Up @@ -397,10 +397,10 @@ class IIPImage {
};

/// Return physical resolution (DPI) in pixels/meter horizontally
float getHorizontalDPI() const { return (dpi_units==2) ? dpi_x*10.0 : ( (dpi_units==1) ? dpi_x*25.4 : dpi_x ); };
float getHorizontalDPI() const { return (dpi_units==2) ? dpi_x*100.0 : ( (dpi_units==1) ? dpi_x/0.0254 : dpi_x ); };

/// Return physical resolution (DPI) in pixels/meter vertically
float getVerticalDPI() const { return (dpi_units==2) ? dpi_y*10.0 : ( (dpi_units==1) ? dpi_y*25.4 : dpi_y ); };
float getVerticalDPI() const { return (dpi_units==2) ? dpi_y*100.0 : ( (dpi_units==1) ? dpi_y/0.0254 : dpi_y ); };

/// Return whether this image type directly handles region decoding
virtual bool regionDecoding(){ return false; };
Expand Down

0 comments on commit f88a826

Please sign in to comment.