Bug 404160 - Krita creates a garbled image when converting from png or jpg to gif
Summary: Krita creates a garbled image when converting from png or jpg to gif
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: 4.1.7
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2019-02-09 23:42 UTC by Antti Savolainen
Modified: 2019-04-23 17:23 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Savolainen 2019-02-09 23:42:33 UTC
SUMMARY
When you want to convert a png or a jpg as a single image to gif, it creates a garbled image. Here is a link to test images and a .kra https://mega.nz/#F!UQRkRAyD!44LNVoMwoP7EuqY3D4Ybcg 

STEPS TO REPRODUCE
1. Open the linked .kra in krita
2. Save it as a gif

OBSERVED RESULT
Krita creates a garbled image, similar to what is seen in the link

EXPECTED RESULT
A normal still image in gif format

SOFTWARE/OS VERSIONS
Xubuntu 18.10
Version: krita 4.2.0-pre-alpha
Comment 1 wolthera 2019-03-06 09:43:48 UTC
Can reproduce with the nightly builds.
Comment 2 Dmitry Kazakov 2019-04-23 17:23:50 UTC
Git commit 4443c7065791754067fcda13d3c4db5d01e19c79 by Dmitry Kazakov.
Committed on 23/04/2019 at 17:18.
Pushed by dkazakov into branch 'master'.

Fix line length in GIF export

We cannot use QImage::bytesPerLine() for line length calculation
because it usually includes alignment bytes, which are not
recognized by giflib (obviously!).

M  +6    -1    plugins/impex/gif/qgiflibhandler.cpp

https://invent.kde.org/kde/krita/commit/4443c7065791754067fcda13d3c4db5d01e19c79