Commit c6d2802c authored by twanvl's avatar twanvl

Always save images as png, fixes #69

parent 0860db16
...@@ -41,7 +41,7 @@ void ImageValueEditor::sliceImage(const Image& image) { ...@@ -41,7 +41,7 @@ void ImageValueEditor::sliceImage(const Image& image) {
// store the image into the set // store the image into the set
FileName new_image_file = getLocalPackage().newFileName(field().name,_("")); // a new unique name in the package FileName new_image_file = getLocalPackage().newFileName(field().name,_("")); // a new unique name in the package
Image img = s.getImage(); Image img = s.getImage();
img.SaveFile(getLocalPackage().nameOut(new_image_file), img.HasAlpha() ? wxBITMAP_TYPE_PNG : wxBITMAP_TYPE_JPEG); img.SaveFile(getLocalPackage().nameOut(new_image_file), wxBITMAP_TYPE_PNG); // always use PNG images, see #69. Disk space is cheap anyway.
addAction(value_action(valueP(), new_image_file)); addAction(value_action(valueP(), new_image_file));
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment