Skip to content

Commit

Permalink
Fix the issue where .png is added when saving even if the file format…
Browse files Browse the repository at this point in the history
… does not use a converter such as jpg or png file.
  • Loading branch information
sdottaka committed Sep 26, 2023
1 parent e56ae07 commit 276b466
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/WinIMergeLib/ImgDiffBuffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1511,15 +1511,17 @@ class CImgDiffBuffer
else
{
m_imgOrigMultiPage[i].close();
if (ImgConverter::isSupportedImage(m_filename[i].c_str()))
if (!m_imgOrig[i].load(m_filename[i]))
{
if (m_imgConverter[i].load(m_filename[i].c_str()))
m_imgConverter[i].render(m_imgOrig[i], 0, m_vectorImageZoomRatio);
}
if (!m_imgConverter[i].isValid())
{
if (!m_imgOrig[i].load(m_filename[i]))
if (ImgConverter::isSupportedImage(m_filename[i].c_str()))
{
if (m_imgConverter[i].load(m_filename[i].c_str()))
m_imgConverter[i].render(m_imgOrig[i], 0, m_vectorImageZoomRatio);
}
if (!m_imgConverter[i].isValid())
{
bSucceeded = false;
}
}
m_imgOrig32[i] = m_imgOrig[i];
std::map<std::string, std::string> meta = m_imgOrig[i].getMetadata();
Expand Down

0 comments on commit 276b466

Please sign in to comment.