Skip to content

Commit

Permalink
Fix reading embedded profiles from PNG
Browse files Browse the repository at this point in the history
  • Loading branch information
victoryforce authored and TurboGit committed Aug 21, 2024
1 parent da49a20 commit 44c2554
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/imageio/imageio_png.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,11 @@ int dt_imageio_png_read_profile(const char *filename, uint8_t **out, dt_colorspa
png_uint_32 proflen = 0;
png_bytep profile;

if(!(filename && *filename)) return 0;
if(!(filename && *filename))
return 0;

if(dt_imageio_png_read_header(filename, &image) != 0) return 0;
if(!dt_imageio_png_read_header(filename, &image))
return 0;

/* TODO: also add check for known cICP chunk read support once added to libpng */
#ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED
Expand Down

0 comments on commit 44c2554

Please sign in to comment.