Public bug reported:

ImageViewer version: 42.0

ImageMagick version (should not matter, ImageMagick seems to be doing its work 
correctly and it's in another package, but dropping just FYI):
$ convert --version
Version: ImageMagick 6.9.11-60 Q16 x86_64 2021-01-25 https://imagemagick.org
Copyright: (C) 1999-2021 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP(4.5) 
Delegates (built-in): bzlib djvu fftw fontconfig freetype heic jbig jng jp2 
jpeg lcms lqr ltdl lzma openexr pangocairo png tiff webp wmf x xml zlib

I was following instructions on
https://askubuntu.com/questions/867567/convert-jpg-or-png-to-ico-using-
terminal-and-back and https://superuser.com/questions/491180/how-do-i-
embed-multiple-sizes-in-an-ico-file to generate a Windows icon from
separate pngs.

While instructions like:

$ convert icon_256.png -define icon:auto-resize=256,128,64,48,32,16 icon.ico
and
$ convert icon_256.png icon_128.png icon_64.png icon_32.png icon_16.png icon.ico

will generate a Windows .ico that can be previewed without issues in
Image Viewer, although it will only show the 128x128 image, not the
bigger 256x256 (not sure if it's a bug or by design).

If you swap sizes to put 256 at the end (you can also switch to
ascending sizes but it's not necessary):

$ convert icon_256.png -define icon:auto-resize=128,64,48,32,16,256 icon.ico
and
$ convert icon_128.png icon_64.png icon_32.png icon_16.png icon_256.png icon.ico

will generate a proper .ico (textures are simply stored in a different
order, as can be shown by extracting them with convert icon.icon
extracted_icon.png) and looking at the generated files in order of
numerical suffixes.

but when opening icon.ico, ImageViewer will show a 128x128 image with
only the bottom part filled with garbage pixels (see screenshot).

** Affects: eog (Ubuntu)
     Importance: Undecided
         Status: New

** Attachment added: "Screenshot of the garbage pixels shown by ImageViewer"
   
https://bugs.launchpad.net/bugs/2021518/+attachment/5676342/+files/2023-05-29%20ImageViewer%20icon%20ending%20with%20256%20texture%20shows%20garbage.png

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to eog in Ubuntu.
https://bugs.launchpad.net/bugs/2021518

Title:
  Image viewer incorrectly previews Windows ico as garbage pixels if
  last texture size is 256

Status in eog package in Ubuntu:
  New

Bug description:
  ImageViewer version: 42.0

  ImageMagick version (should not matter, ImageMagick seems to be doing its 
work correctly and it's in another package, but dropping just FYI):
  $ convert --version
  Version: ImageMagick 6.9.11-60 Q16 x86_64 2021-01-25 https://imagemagick.org
  Copyright: (C) 1999-2021 ImageMagick Studio LLC
  License: https://imagemagick.org/script/license.php
  Features: Cipher DPC Modules OpenMP(4.5) 
  Delegates (built-in): bzlib djvu fftw fontconfig freetype heic jbig jng jp2 
jpeg lcms lqr ltdl lzma openexr pangocairo png tiff webp wmf x xml zlib

  I was following instructions on
  https://askubuntu.com/questions/867567/convert-jpg-or-png-to-ico-
  using-terminal-and-back and
  https://superuser.com/questions/491180/how-do-i-embed-multiple-sizes-
  in-an-ico-file to generate a Windows icon from separate pngs.

  While instructions like:

  $ convert icon_256.png -define icon:auto-resize=256,128,64,48,32,16 icon.ico
  and
  $ convert icon_256.png icon_128.png icon_64.png icon_32.png icon_16.png 
icon.ico

  will generate a Windows .ico that can be previewed without issues in
  Image Viewer, although it will only show the 128x128 image, not the
  bigger 256x256 (not sure if it's a bug or by design).

  If you swap sizes to put 256 at the end (you can also switch to
  ascending sizes but it's not necessary):

  $ convert icon_256.png -define icon:auto-resize=128,64,48,32,16,256 icon.ico
  and
  $ convert icon_128.png icon_64.png icon_32.png icon_16.png icon_256.png 
icon.ico

  will generate a proper .ico (textures are simply stored in a different
  order, as can be shown by extracting them with convert icon.icon
  extracted_icon.png) and looking at the generated files in order of
  numerical suffixes.

  but when opening icon.ico, ImageViewer will show a 128x128 image with
  only the bottom part filled with garbage pixels (see screenshot).

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/eog/+bug/2021518/+subscriptions


-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to