incubator-sanselan-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Charles Matthew Chen" <charlesmc...@gmail.com>
Subject Re: some question about Sanselan
Date Thu, 29 Nov 2007 02:37:18 GMT
   I'm not sure I understood your questions, but:

   1) I'm unclear - is the value you're getting from Sanselan 1115748
or 71?  71 seems more likely.  For a BMP, Physical Height DPI is
simply calculated by dividing the height in pixels by the "physical
height" of the image (which is not included for all .BMP files).

   2) per the PNG spec
(http://www.libpng.org/pub/png/spec/iso/index-object.html), tEXt,
iTXt, and zTXt chunks might have the images Creation Time (although
this seems unlikely).  BMP and GIF have no means to embed this kind of
metadata AFAIK.

   3) For bits per pixel, I would refer your to SampleUsage.java, not
MetadataExample.java (in the same package,
org.apache.sanselan.sampleUsage).  Specifically:

ImageInfo imageInfo = Sanselan.getImageInfo(src);
int bitsPerPixel = imageInfo.getBitsPerPixel();

   where src might be a File or byte array.  There is a variation of
getImageInfo() that takes an InputStream as well.

Charles.





On Nov 22, 2007 2:21 AM,  <panye123@sina.com> wrote:
> hi:
>    i use Sanselan to search image metadata,during this course,i have meet
> some question:
>    1.parser .bmp file ,the ImageInfo's Physical Height Dpi like
> "1115748",what's mean of this number,i saw the image property this value is
> 71 dpi.
>    2.like .bmp,*.png,*.gif file ,how to get it info of date(created time
> ,modified time ).
>    3.i use MetadataExample.java,this example can't get Bits Per Pixel,how
> can i get it.
>
> thanks  ye
>
> 2007-11-22
>
>  -------------------------------------------------------------------
>  贺金山上市 毒霸历史最低价 25元半年(
> http://d1.sina.com.cn/sina/limeng3/mail_zhuiyu/2007/mail_zhuiyu_20071112.html
> )
>
>  ===================================================================
>  看股票最新行情,与大家分享讨论,新浪财经吧火热上线!( http://bar.sina.com.cn/channel.php?chid=1
)
Mime
View raw message