[jira] [Commented] (FOP-2512) java.lang.NullPointerException: Parameter alpha must not be null

2015-12-18 Thread simon steiner (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15064020#comment-15064020
 ] 

simon steiner commented on FOP-2512:


Can this be closed?

> java.lang.NullPointerException: Parameter alpha must not be null
> 
>
> Key: FOP-2512
> URL: https://issues.apache.org/jira/browse/FOP-2512
> Project: FOP
>  Issue Type: Bug
>Affects Versions: 2.0
>Reporter: Mathieu Malaterre
> Attachments: 16x16.png, 19x13.png, 22x22.png
>
>
> fop is not capable of dealing with some PNG, it keeps on failing with:
> Error while rendering page 9
> java.lang.NullPointerException: Parameter alpha must not be null
> Exception
> java.lang.NullPointerException: Parameter alpha must not be null
> Input is:
> $ pnginfo test.png
> test.png...
>   Image Width: 411 Image Length: 225
>   Bitdepth (Bits/Sample): 8
>   Channels (Samples/Pixel): 1
>   Pixel depth (Pixel Depth): 8
>   Colour Type (Photometric Interpretation): PALETTED COLOUR with alpha (18 
> colours, 17 transparent) 
>   Image filter: Single row per byte filter 
>   Interlacing: No interlacing 
>   Compression Scheme: Deflate method 8, 32k window
>   Resolution: 0, 0 (unit unknown)
>   FillOrder: msb-to-lsb
>   Byte Order: Network (Big Endian)
>   Number of text strings: 0 of 0



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FOP-2512) java.lang.NullPointerException: Parameter alpha must not be null

2015-12-18 Thread Matthias Reischenbacher (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15064235#comment-15064235
 ] 

Matthias Reischenbacher commented on FOP-2512:
--

Yes. I can't, because I don't seem to have the right to do so.

> java.lang.NullPointerException: Parameter alpha must not be null
> 
>
> Key: FOP-2512
> URL: https://issues.apache.org/jira/browse/FOP-2512
> Project: FOP
>  Issue Type: Bug
>Affects Versions: 2.0
>Reporter: Mathieu Malaterre
> Attachments: 16x16.png, 19x13.png, 22x22.png
>
>
> fop is not capable of dealing with some PNG, it keeps on failing with:
> Error while rendering page 9
> java.lang.NullPointerException: Parameter alpha must not be null
> Exception
> java.lang.NullPointerException: Parameter alpha must not be null
> Input is:
> $ pnginfo test.png
> test.png...
>   Image Width: 411 Image Length: 225
>   Bitdepth (Bits/Sample): 8
>   Channels (Samples/Pixel): 1
>   Pixel depth (Pixel Depth): 8
>   Colour Type (Photometric Interpretation): PALETTED COLOUR with alpha (18 
> colours, 17 transparent) 
>   Image filter: Single row per byte filter 
>   Interlacing: No interlacing 
>   Compression Scheme: Deflate method 8, 32k window
>   Resolution: 0, 0 (unit unknown)
>   FillOrder: msb-to-lsb
>   Byte Order: Network (Big Endian)
>   Number of text strings: 0 of 0



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FOP-2512) java.lang.NullPointerException: Parameter alpha must not be null

2015-11-26 Thread Matthias Reischenbacher (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15029190#comment-15029190
 ] 

Matthias Reischenbacher commented on FOP-2512:
--

Fixed in http://svn.apache.org/viewvc?view=revision=1716758

It's interesting to see how much bug reports are out there in the web about 
this same issue:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=692556
https://github.com/dita-ot/dita-ot/issues/1822
http://jira.xwiki.org/browse/XWIKI-8274

My fix avoids to create an alpha raster, if the ColorModel implementation 
doesn't return one. This issue seems to affect only transparent PNGs with 
indexed color model. The alpha raster is used for the SMask entry in PDF. 
Transparency works in PDF even without SMask (any only with Mask) entry. Please 
let me know if there is anything wrong with my approach.

> java.lang.NullPointerException: Parameter alpha must not be null
> 
>
> Key: FOP-2512
> URL: https://issues.apache.org/jira/browse/FOP-2512
> Project: FOP
>  Issue Type: Bug
>Affects Versions: 2.0
>Reporter: Mathieu Malaterre
> Attachments: 16x16.png, 19x13.png, 22x22.png
>
>
> fop is not capable of dealing with some PNG, it keeps on failing with:
> Error while rendering page 9
> java.lang.NullPointerException: Parameter alpha must not be null
> Exception
> java.lang.NullPointerException: Parameter alpha must not be null
> Input is:
> $ pnginfo test.png
> test.png...
>   Image Width: 411 Image Length: 225
>   Bitdepth (Bits/Sample): 8
>   Channels (Samples/Pixel): 1
>   Pixel depth (Pixel Depth): 8
>   Colour Type (Photometric Interpretation): PALETTED COLOUR with alpha (18 
> colours, 17 transparent) 
>   Image filter: Single row per byte filter 
>   Interlacing: No interlacing 
>   Compression Scheme: Deflate method 8, 32k window
>   Resolution: 0, 0 (unit unknown)
>   FillOrder: msb-to-lsb
>   Byte Order: Network (Big Endian)
>   Number of text strings: 0 of 0



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FOP-2512) java.lang.NullPointerException: Parameter alpha must not be null

2015-10-29 Thread Vinesh Kumar (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14980165#comment-14980165
 ] 

Vinesh Kumar commented on FOP-2512:
---

Update the AlphaRasterImage class constructor like below to fix the issue. 

Existing: 
=== 

public AlphaRasterImage(String k, RenderedImage image) { 
this(k, GraphicsUtil.getAlphaRaster(image)); 
} 

Updated: 

/** 
 * Create a alpha channel image. 
 * Extracts the alpha channel from the RenderedImage and creates a new 
bitmap image 
 * with the given data. 
 * 
 * @param k the key to be used to lookup the image 
 * @param image the image (must have an alpha channel) 
 */ 
public AlphaRasterImage(String k, RenderedImage image) { 
this(k, getAlphaRaster(image)); 
} 

/** 
 *   
 * 
 * Fix for Alpha Raster Image Issue. 
 * 
 * Extracts the Alpha Raster for the given image. 
 * 
 */ 
private static java.awt.image.Raster getAlphaRaster(RenderedImage image) 
{ 
java.awt.image.Raster alphaRaster = GraphicsUtil.getAlphaRaster(image); 

/* 
* If alphaRaster is null from the above call, then create the image with 
* alpha channel and return the alphaRaster. 
*/ 
if (alphaRaster == null) 
{ 
BufferedImage bufferedImage = (BufferedImage)image; 
int w = bufferedImage.getWidth(); 
int h = bufferedImage.getHeight(); 
int type = BufferedImage.TYPE_INT_ARGB; 
BufferedImage bia = new BufferedImage(w,h,type); 
Graphics2D g = bia.createGraphics(); 
ImageObserver imo = null; 
g.drawImage(bufferedImage, 0, 0, imo); 
g.dispose(); 
alphaRaster = GraphicsUtil.getAlphaRaster(bia); 
} 
return alphaRaster; 
} 

> java.lang.NullPointerException: Parameter alpha must not be null
> 
>
> Key: FOP-2512
> URL: https://issues.apache.org/jira/browse/FOP-2512
> Project: FOP
>  Issue Type: Bug
>Affects Versions: 2.0
>Reporter: Mathieu Malaterre
> Attachments: 16x16.png, 19x13.png, 22x22.png
>
>
> fop is not capable of dealing with some PNG, it keeps on failing with:
> Error while rendering page 9
> java.lang.NullPointerException: Parameter alpha must not be null
> Exception
> java.lang.NullPointerException: Parameter alpha must not be null
> Input is:
> $ pnginfo test.png
> test.png...
>   Image Width: 411 Image Length: 225
>   Bitdepth (Bits/Sample): 8
>   Channels (Samples/Pixel): 1
>   Pixel depth (Pixel Depth): 8
>   Colour Type (Photometric Interpretation): PALETTED COLOUR with alpha (18 
> colours, 17 transparent) 
>   Image filter: Single row per byte filter 
>   Interlacing: No interlacing 
>   Compression Scheme: Deflate method 8, 32k window
>   Resolution: 0, 0 (unit unknown)
>   FillOrder: msb-to-lsb
>   Byte Order: Network (Big Endian)
>   Number of text strings: 0 of 0



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FOP-2512) java.lang.NullPointerException: Parameter alpha must not be null

2015-09-17 Thread Stefan Quandt (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14791728#comment-14791728
 ] 

Stefan Quandt commented on FOP-2512:


Section 3.5.3.2.1 "PDF issue" of
  https://jmodalwindow.java.net/manual/dpl/html_single/index.html
a) suggests  that this is not a new issue and
b) offers a workaround by removing transparency with 'convert -layers flatten' 
(ImageMagick)
  Subsequently restoring transparency with 'convert -transparent #FF' also 
works for me.


> java.lang.NullPointerException: Parameter alpha must not be null
> 
>
> Key: FOP-2512
> URL: https://issues.apache.org/jira/browse/FOP-2512
> Project: FOP
>  Issue Type: Bug
>Affects Versions: 2.0
>Reporter: Mathieu Malaterre
>
> fop is not capable of dealing with some PNG, it keeps on failing with:
> Error while rendering page 9
> java.lang.NullPointerException: Parameter alpha must not be null
> Exception
> java.lang.NullPointerException: Parameter alpha must not be null
> Input is:
> $ pnginfo test.png
> test.png...
>   Image Width: 411 Image Length: 225
>   Bitdepth (Bits/Sample): 8
>   Channels (Samples/Pixel): 1
>   Pixel depth (Pixel Depth): 8
>   Colour Type (Photometric Interpretation): PALETTED COLOUR with alpha (18 
> colours, 17 transparent) 
>   Image filter: Single row per byte filter 
>   Interlacing: No interlacing 
>   Compression Scheme: Deflate method 8, 32k window
>   Resolution: 0, 0 (unit unknown)
>   FillOrder: msb-to-lsb
>   Byte Order: Network (Big Endian)
>   Number of text strings: 0 of 0



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FOP-2512) java.lang.NullPointerException: Parameter alpha must not be null

2015-09-17 Thread Mathieu Malaterre (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14791731#comment-14791731
 ] 

Mathieu Malaterre commented on FOP-2512:


Adding direct link: 
https://jmodalwindow.java.net/manual/dpl/html_single/index.html#prg.perl.image.magick.pdf

> java.lang.NullPointerException: Parameter alpha must not be null
> 
>
> Key: FOP-2512
> URL: https://issues.apache.org/jira/browse/FOP-2512
> Project: FOP
>  Issue Type: Bug
>Affects Versions: 2.0
>Reporter: Mathieu Malaterre
>
> fop is not capable of dealing with some PNG, it keeps on failing with:
> Error while rendering page 9
> java.lang.NullPointerException: Parameter alpha must not be null
> Exception
> java.lang.NullPointerException: Parameter alpha must not be null
> Input is:
> $ pnginfo test.png
> test.png...
>   Image Width: 411 Image Length: 225
>   Bitdepth (Bits/Sample): 8
>   Channels (Samples/Pixel): 1
>   Pixel depth (Pixel Depth): 8
>   Colour Type (Photometric Interpretation): PALETTED COLOUR with alpha (18 
> colours, 17 transparent) 
>   Image filter: Single row per byte filter 
>   Interlacing: No interlacing 
>   Compression Scheme: Deflate method 8, 32k window
>   Resolution: 0, 0 (unit unknown)
>   FillOrder: msb-to-lsb
>   Byte Order: Network (Big Endian)
>   Number of text strings: 0 of 0



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)