mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-01 18:00:26 +00:00
Improve message error when loading a sequence of png files whose color modes don't match (fix #3751)
This commit is contained in:
parent
7422abf490
commit
e577852eb4
@ -1309,8 +1309,10 @@ ImageRef FileOp::sequenceImage(PixelFormat pixelFormat, int w, int h)
|
||||
else {
|
||||
sprite = m_document->sprite();
|
||||
|
||||
if (sprite->pixelFormat() != pixelFormat)
|
||||
if (sprite->pixelFormat() != pixelFormat) {
|
||||
setError("Error: image does not match color mode\n");
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_seq.last_cel) {
|
||||
|
@ -279,10 +279,8 @@ bool PngFormat::onLoad(FileOp* fop)
|
||||
int imageWidth = png_get_image_width(png, info);
|
||||
int imageHeight = png_get_image_height(png, info);
|
||||
ImageRef image = fop->sequenceImage(pixelFormat, imageWidth, imageHeight);
|
||||
if (!image) {
|
||||
fop->setError("file_sequence_image %dx%d\n", imageWidth, imageHeight);
|
||||
if (!image)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Transparent color
|
||||
png_color_16p png_trans_color = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user