suicao / pngj

Automatically exported from code.google.com/p/pngj

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

invalid bitdepth ? how to solve it?

GoogleCodeExporter opened this issue · comments

What steps will reproduce the problem?
1. add jars.
2. write a sample to genarate the png image follow the PngCreate class in the 
source jar.
3. run it.

What is the expected output? What do you see instead?

ar.com.hjg.pngj.PngjException: invalid bitdepth=5
    at ar.com.hjg.pngj.ImageInfo.<init>(ImageInfo.java:93)
    at ar.com.hjg.pngj.ImageInfo.<init>(ImageInfo.java:50)
    at cn.xiazhengxin.blog.util.GenPng.Create(GenPng.java:22)
………………

What version of the product are you using? On what operating system?

JDK 6u21 on ubuntu 10.04

Please provide any additional information below.

none.

Original issue reported on code.google.com by amoiz.sh...@gmail.com on 29 Aug 2010 at 9:46

Apparently you are creating a file with a bitdepth=5? That is a invalid value, 
PNG only supports 1/4/8/16 -a and is library currently only supports RGB (8 or 
16 bits)

Original comment by hgonzalez@gmail.com on 25 May 2011 at 5:10