Skip to content

Commit

Permalink
Some png files in the wild actually contain JPG/JFIF data inside. If …
Browse files Browse the repository at this point in the history
…strict loading is off (the default) these files will now load in Tacent View. If strict is enabled, they won't.
  • Loading branch information
bluescan committed Aug 3, 2023
1 parent 14e2cf0 commit d6f5a37
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Src/Image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,10 @@ bool Image::Load()
case tSystem::tFileType::PNG:
{
tImagePNG png;
bool ok = png.Load(Filename);
uint32 loadFlags =
(!Config::Current->StrictLoading ? tImagePNG::LoadFlag_AllowJPG : 0);

bool ok = png.Load(Filename, loadFlags);
if (!ok)
break;

Expand Down

0 comments on commit d6f5a37

Please sign in to comment.