octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #36820] imread doesn't consider opacity in Mag


From: Andreas Weber
Subject: [Octave-bug-tracker] [bug #36820] imread doesn't consider opacity in Magick::BilevelType, Patch included
Date: Wed, 11 Jul 2012 08:00:09 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.5) Gecko/20100101 Firefox/10.0.5 Iceweasel/10.0.5

Follow-up Comment #1, bug #36820 (project octave):

I don't think it's that easy. The image rect.png was probably created with
MS-Paint and has 1-bit gray-depth and 8-bit opacity-depth:

gm identify -verbose rect.png
Image: rect.png
  Format: PNG (Portable Network Graphics)
  Geometry: 800x600
  Class: DirectClass
  Type: bilevel
  Depth: 1 bits-per-pixel component
  Channel Depths:
    Gray:     1 bits
    Opacity:  8 bits
  Channel Statistics:
    Gray:
      Minimum:                     0.00 (0.0000)
      Maximum:                     0.00 (0.0000)
      Mean:                        0.00 (0.0000)
      Standard Deviation:          0.00 (0.0000)
    Opacity:
      Minimum:                     0.00 (0.0000)
      Maximum:                   255.00 (1.0000)
      Mean:                      249.34 (0.9778)
      Standard Deviation:         35.38 (0.1387)
  Opacity: (  0,  0,  0,255)      #000000FF


So I think the image (rectangles, A-D) seen with gimp or any other viewer like
eog is only in the alpha channel. Nevertheless


[img,map,alpha]=imread("rect.png");

Should the return the "seen image" in var alpha but 

>size(alpha)
ans =
   0   0


I will create some PNG test-images with gimp and MS-Paint for the different
image types (RGB, grayscale,bilevel, with or without alpha channel), write
some test-scripts and suggest a patch the next week.

greetings, Andy


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?36820>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]