[okular] [Bug 377202] Empty DJVU page displayed in black

2019-04-22 Thread Alexander Trufanov
https://bugs.kde.org/show_bug.cgi?id=377202

--- Comment #6 from Alexander Trufanov  ---
Created attachment 119550
  --> https://bugs.kde.org/attachment.cgi?id=119550=edit
Djvu doc 2

This djvu contain page 3 which is displayed incorrectly when zoomed.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 377202] Empty DJVU page displayed in black

2019-04-22 Thread Alexander Trufanov
https://bugs.kde.org/show_bug.cgi?id=377202

Alexander Trufanov  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---
 Ever confirmed|0   |1

--- Comment #5 from Alexander Trufanov  ---
Hi,

I've just updated to Kubuntu 19.04 and got new Okular 1.6.3 which correctly
display empty djvu pages. But, I've found a document where it still have a bug.
It hapens only on page 3 (first empty page in doc), but not for other empty
pages. And it's easy to reproduce if you try to zoom this page.

So, check the attached document, got to page 3, zoom it. You'll get a corrupt
page view.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 385384] Some PNG files produced by acdsee can't be displayed

2017-11-14 Thread Alexander Trufanov
https://bugs.kde.org/show_bug.cgi?id=385384

Alexander Trufanov <trufano...@gmail.com> changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|CONFIRMED   |RESOLVED

--- Comment #3 from Alexander Trufanov <trufano...@gmail.com> ---
https://phabricator.kde.org/R223:4b2ba6a7af2581660f6b1201991664d749e79b42

-- 
You are receiving this mail because:
You are the assignee for the bug.

D8415: Soften correctness of image file open check

2017-11-14 Thread Alexander Trufanov
This revision was automatically updated to reflect the committed changes.
Closed by commit R223:4b2ba6a7af25: Try to display a malformed image if 
feasible (authored by trufanov).

REPOSITORY
  R223 Okular

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D8415?vs=22327=22331

REVISION DETAIL
  https://phabricator.kde.org/D8415

AFFECTED FILES
  generators/kimgio/generator_kimgio.cpp

To: trufanov, ngraham, #okular, aacid
Cc: aacid, progwolff, ngraham


D8415: Soften correctness of image file open check

2017-11-14 Thread Alexander Trufanov
trufanov updated this revision to Diff 22327.
trufanov added a comment.


  Wording of a warning message is changed.
  With dot at sentence end.
  A screenshot of warning appearance is 
attached{https://phabricator.kde.org/F5491726}

REPOSITORY
  R223 Okular

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D8415?vs=22254=22327

REVISION DETAIL
  https://phabricator.kde.org/D8415

AFFECTED FILES
  generators/kimgio/generator_kimgio.cpp

To: trufanov, ngraham, #okular, aacid
Cc: aacid, progwolff, ngraham


D8415: Soften correctness of image file open check

2017-11-13 Thread Alexander Trufanov
trufanov added a comment.


  @ngraham Feel free to do it yourself.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D8415

To: trufanov, ngraham, #okular, aacid
Cc: aacid, progwolff, ngraham


D8415: Soften correctness of image file open check

2017-11-13 Thread Alexander Trufanov
trufanov added a comment.


  Ok, I've added a warning for this. Please check wording - english isn't my 
native language. Feel free to change it.
  Attached are screenshots of Okular showing current warning for eng and rus 
locales.F5489936: Screenshot_20171113_113818.png 

  
  F5489935: Screenshot_20171113_113834.png 


REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D8415

To: trufanov, ngraham, #okular, aacid
Cc: aacid, progwolff, ngraham


[okular] [Bug 385384] Some PNG files produced by acdsee can't be displayed

2017-11-07 Thread Alexander Trufanov
https://bugs.kde.org/show_bug.cgi?id=385384

--- Comment #2 from Alexander Trufanov <trufano...@gmail.com> ---
The workaround is proposed on https://phabricator.kde.org/D8415

-- 
You are receiving this mail because:
You are the assignee for the bug.

D8415: Soften correctness of image file open check

2017-10-30 Thread Alexander Trufanov
trufanov added a comment.


  In https://phabricator.kde.org/D8415#162014, @aacid wrote:
  
  > In https://phabricator.kde.org/D8415#160837, @trufanov wrote:
  >
  > > In https://phabricator.kde.org/D8415#159049, @aacid wrote:
  > >
  > > > Please consider fixing this in Qt before asking us to create a 
workaround.
  > >
  > >
  > > I'm fine with workarounded gwenview as well as working GIMP and 
ImageMagick.
  >
  >
  > Is this your way of saying "i'm not interested in pursuing a fix in Qt"?
  
  
  I would be honered to commit a fix into Qt framework (never did yet).  I'm 
also happy to commit something into KDE.
  But in my opinion it's most probably a libpng problem. And if I suggest a 
workaround to Qt team they'll answer me "Please consider fixing this in libpng 
before asking us to create a workaround." So I have to investigate libpng 
beforehand. I don't know png format specifications at all. And don't want to. 
That'll take time to investigate and a weeks of discussion with responsible 
teams.
  And then I'll face with one of 3 options:
  
  1. I need to add a warning level in binary "error/everything is ok" 
communication between Qt and libpng. And adjust Qt's images format plugin 
system. That would be best one.
  2. It's indeed a libpng-only problem. And they may return no error in such 
cases. (And they can argue that this is by design, by png standard or breaks 
binary compatibility).
  3. Most probable option - it's acdsee app problem. Perhaps, only N-years old 
acdsee version problem. Which is proprietary software and both Qt and libpng 
will ignore it.
  
  So, I just have no time for digging into this further.
  I have an app. I've got user feedback that some png images do not open. Got 
an example. I was surprised to find that some opensource Qt apps could open it 
and some could not and leveraged with this to fix my app. I'm fine. And I just 
wanted to share my findings in case they could be useful. So it just a bit less 
than feasible for me to keen digging into this,
  (Btw, the proposed patch is that I find out from just a gwenview, I've not 
checked why particular GIMP and ImageMagick has no such problem. The reason may 
be different.)
  
  I would summarise this as following. This could be marked as WONT_FIX. My 
users are quite a specific guys which scan books and conservative enough to use 
weird software and its versions for years (or perhaps a decade) following 
manuals and trying to keep quality. If I'll face with file that is created by 
modern software I would be more keen to fix it.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D8415

To: trufanov, ngraham, #okular
Cc: aacid, progwolff


D8415: Soften correctness of image file open check

2017-10-27 Thread Alexander Trufanov
trufanov added a comment.


  In https://phabricator.kde.org/D8415#159049, @aacid wrote:
  
  > Please consider fixing this in Qt before asking us to create a workaround.
  
  
  I'm fine with workarounded gwenview as well as working GIMP and ImageMagick.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D8415

To: trufanov, ngraham, #okular
Cc: aacid, progwolff


D8415: Soften correctness of image file open check

2017-10-23 Thread Alexander Trufanov
trufanov added a comment.


  Ok, I've edited summary. Didn't know that KDE Bugs could be referred in a 
such way in phabricator summary instead of commit message.
  Also I heard I can add
  Differential Revision: https://phabricator.kde.org/D8415
  in commit message to automatically close phabricator review. Is it so?
  
  As for testing. So far so good.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D8415

To: trufanov, ngraham, #okular
Cc: aacid


D8415: Soften correctness of image file open check

2017-10-23 Thread Alexander Trufanov
trufanov edited the summary of this revision.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D8415

To: trufanov, ngraham, #okular
Cc: aacid


D8415: Soften correctness of image file open check

2017-10-22 Thread Alexander Trufanov
trufanov created this revision.
trufanov added reviewers: ngraham, Okular.
trufanov added a project: Okular.

REVISION SUMMARY
  resolves bug https://bugs.kde.org/show_bug.cgi?id=385384
  
  Bug 385384 - Some PNG files produced by acdsee can't be displayed
  
  > Hi,
  >  I've got a png file that could be opened in gwenview, GIMP and 
ImageMagick. But can't be viewed in Okular. My app had the same problem so I 
dig into gwenview sourcecode to find the solution and now would like to share 
my findings.
  > 
  > As gwenview my app uses Qt's QImage/QImageReader to load this png file. And 
Qt uses libpng1.6.28-1 that prints in std::cout "libpng error: Read Error" in 
both cases. But gwenview ignores this error and still able to show image. Bcs 
instead of `void QImage::load(...)` or `QImage QImageReader::read()` it invokes 
`bool QImageReader::read(QImage *)`. And it ignores its result value if 
returned QImage is valid.
  > 
  > This allowed me to workaround problem in my app.
  > 
  > Gwenviews code: 
  >  They log an error here 

 but as loadImageData() is a void function and mImage still contains valid 
image the app displays it as usual.
  
  My assumption is that png has incomplete or incorrect set of flags in header 
so libpng reports error while still loads image data to RAM.
  
  A test png is attached.
  I was told that this was a tiff file (result of scanning) that was converted 
to png with acdsee v3.1 under Win.
  
  Attachment 

TEST PLAN
  Try to open attached png file. It can't be opened.
  Apply patch (make sure Okular uses fixed okularGenerator_kimgio.so) - now it 
could be opened and displayed correctly.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D8415

AFFECTED FILES
  generators/kimgio/generator_kimgio.cpp

To: trufanov, ngraham, #okular
Cc: aacid


[okular] [Bug 385384] New: Some PNG files produced by acdsee can't be displayed

2017-10-05 Thread Alexander Trufanov
https://bugs.kde.org/show_bug.cgi?id=385384

Bug ID: 385384
   Summary: Some PNG files produced by acdsee can't be displayed
   Product: okular
   Version: 1.2.70
  Platform: Debian stable
OS: Linux
Status: UNCONFIRMED
  Severity: normal
  Priority: NOR
 Component: general
  Assignee: okular-devel@kde.org
  Reporter: trufano...@gmail.com
  Target Milestone: ---

Created attachment 108176
  --> https://bugs.kde.org/attachment.cgi?id=108176=edit
test png image

Hi,
I've got a png file that could be opened in gwenview, GIMP and ImageMagick. But
can't be viewed in Okular. My app had the same problem so I dig into gwenview
sourcecode to find the solution and now would like to share my findings.

As gwenview my app uses Qt's QImage/QImageReader to load this png file. And Qt
uses libpng1.6.28-1 that prints in std::cout "libpng error: Read Error" in both
cases. But gwenview ignores this error and still able to show image. Bcs
instead of `void QImage::load(...)` or `QImage QImageReader::read()` it invokes
`bool QImageReader::read(QImage *)`. And it ignores its result value if
returned QImage is valid.

This allowed me to workaround problem in my app.

Gwenviews code: 
The log error
[here](https://github.com/KDE/gwenview/blob/1259680d9295bf4d36f481d9a2002639738ff00d/lib/document/loadingdocumentimpl.cpp#L317)
but as loadImageData() is a void function and mImage still contains valid image
the app displays it as usual.

My assumption is that png has incomplete or incorrect set of flags in header so
libpng reports error while still loads image data to RAM.

A test png is attached.
I was told that this was a tiff file (result of scanning) that was converted to
png with acdsee v3.1 under Win.

-- 
You are receiving this mail because:
You are the assignee for the bug.