Bug 77126 - bad rendering of flipped PNGs with alpha channel
Summary: bad rendering of flipped PNGs with alpha channel
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.2.1 release
Hardware: Other All
: medium normal
Assignee: Tomaz Vajngerl
URL:
Whiteboard: target:4.3.0 target:4.2.5
Keywords: bibisected, regression
Depends on:
Blocks:
 
Reported: 2014-04-07 09:20 UTC by Rico Tzschichholz
Modified: 2015-12-17 07:56 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Testfile which includes two flipped PNGs, with/without alpha channel (90.57 KB, application/vnd.oasis.opendocument.text)
2014-04-09 06:02 UTC, Rico Tzschichholz
Details
Testfile opened with 4.2.3.3 on Ubuntu Trusty/14.04 (267.13 KB, image/png)
2014-04-09 06:03 UTC, Rico Tzschichholz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rico Tzschichholz 2014-04-07 09:20:06 UTC
Flipping inserted pictures results in a broken image presentation.

Steps to reproduce:
1/ Open Writer
2/ Insert->Image->From File...
3/ Right Click->Picture->Picture Tab->Flip - Vertically/Horizontally

Excepted result:
Flipped picture

Actual result:
Mangled picture
Comment 1 Rico Tzschichholz 2014-04-08 09:50:38 UTC
4.1.5.3 works correctly
4.2.2.1 already broken
Comment 2 tommy27 2014-04-09 04:03:33 UTC
@Rico

tested under Win7x64
not reproducible with 4.1.5.3 and 4.2.2.1
I can flip images with no issue.

what do you exactly mean "mangled picture" ?

please upload test file and screenshot and specify your O/S.

set status to NEEDINFO. revert it to UNCONFIRMED once provided requested infos.
Comment 3 Rico Tzschichholz 2014-04-09 06:02:42 UTC
Created attachment 97107 [details]
Testfile which includes two flipped PNGs, with/without alpha channel
Comment 4 Rico Tzschichholz 2014-04-09 06:03:49 UTC
Created attachment 97108 [details]
Testfile opened with 4.2.3.3 on Ubuntu Trusty/14.04
Comment 5 Rico Tzschichholz 2014-04-09 06:08:23 UTC
The problem seems to be restricted to PNGs with alpha channel.

Confirmed running Ubuntu using libpng12.
Comment 6 tommy27 2014-04-09 11:24:07 UTC
@Rico
nice screenshot and test case.

I can confirm the bug is not present in 4.1.5.3.
I will test later this evening with 4.2.x 

in the meantime I revert status to UNCONFIRMED.
Comment 7 tommy27 2014-04-09 18:58:00 UTC
strange...
bug reproducible in 4.2.0 final
works fine in 4.2.1 final
and is reproducible again in 4.2.2 final

in my Win7x64 when you file that image it disappears
Comment 8 tommy27 2014-04-09 19:15:30 UTC
(In reply to comment #7)
> ...
> in my Win7x64 when you file that image it disappears

when you "flip" the image
Comment 9 Andras Timar 2014-04-11 10:16:52 UTC
 3cf3700b7a903e88f5296076c40ae854bce91cdc is the first bad commit
commit 3cf3700b7a903e88f5296076c40ae854bce91cdc
Author: Jan Holesovsky <kendy@collabora.com>
Date:   Mon Jan 27 20:11:26 2014 +0100

    fdo#74124: Scale the pictures before calling ImplDrawAlpha().
Comment 10 Commit Notification 2014-04-30 14:58:42 UTC
Tomaž Vajngerl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=818a0ed6c6b2f7176551f1db0ff518b5a0bb522e

fdo#77126 BitmapEx.Scale already takes care of mirroring



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2014-04-30 20:14:43 UTC
Tomaž Vajngerl committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=10fef58379630c9d8e8ba76258baee917959e7c5&h=libreoffice-4-2

fdo#77126 BitmapEx.Scale already takes care of mirroring


It will be available in LibreOffice 4.2.5.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 12 Robinson Tryon (qubit) 2015-12-17 07:56:03 UTC
Migrating Whiteboard tags to Keywords: (bibisected)
[NinjaEdit]