Skip to main content



      Home
Home » Archived » BIRT » Is this a dumb question?
Is this a dumb question? [message #127150] Thu, 09 February 2006 10:53 Go to next message
Eclipse UserFriend
Originally posted by: fgheorghe.eprimepoint.com

I searched bugzilla and I couldn't find any reference to this. I also
searched this newsgroup.

I'm trying to insert a java image (BufferedImage) into a Birt Report.
I'm using a scripted data set to retrieve the buffered image from a java
object and I am putting it into a Dynamic Image item with the expression
set to row["BAR_CODE_IMAGE"] in my report template.

When I run the report (from a within a java application) I get the
following error message :

Feb 9, 2006 10:37:50 AM
org.eclipse.birt.report.engine.layout.impl.ImageLayoutManage r layout
SEVERE: can't retrieve image intrinsic dimension!

So I put some system.out code inside of the ImageLayoutManager.java in
the "protected Dimension getIntrinsicDimension(IImageContent content)"
method and I recompiled the class. Here is the output :

>> Inside getIntrinsicDimension
>> content.getAltText() : null
>> content.getExtension() : null
>> content.getGenerateBy() :
org.eclipse.birt.report.engine.ir.ImageItemDesign@16fdac
>> content.getImageMap() : null
>> content.getImageSource() : 2
>> content.getMIMEType() : null
>> content.getName() : null
>> content.getURI() : null
>> content.getBounds() : null
>> content.getChildren() : []
>> content.getClass() : class >>
content.org.eclipse.birt.report.engine.content.impl.ImageCon tent
>> content.getComputedStyle() :
org.eclipse.birt.report.engine.css.dom.ComputedStyle@1b2d7df
>> content.getData() : null
>> content.getHeight() : 62px
>> content.getInstanceID() : /240(QuRs368224148:0)
>> content.getParent() :
org.eclipse.birt.report.engine.content.impl.CellContent@7a9224
>> content.getReportContent() :
org.eclipse.birt.report.engine.content.impl.ReportContent@19fdbcb
>> content.getWidth() : 299px


When I switch the report element to be a URI with an expression of
row["BAR_CODE_IMAGE"] the call to content.getURI() returns
>>content.getURI() : BufferedImage@363068: type = 1 DirectColorModel:
rmask=ff0000 gmask=ff00 bmask=ff amask=0 IntegerInterleavedRaster: width
= 191 height = 35 #Bands = 3 xOff = 0 yOff = 0 dataOffset[0] 0

So I know that my row["BAR_CODE_IMAGE"] actually contains my buffered image.

Do I have something set up wrong? Are java images not supported yet in Birt?

Thank you for any help,
florin
Re: Is this a dumb question? [message #138823 is a reply to message #127150] Fri, 03 March 2006 07:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: juergen.schwarz.gefasoft.de

I have the same problem like you, so we seems to be both dumb!
Any ideas to overcome this problem?


Florin schrieb:
> I searched bugzilla and I couldn't find any reference to this. I also
> searched this newsgroup.
>
> I'm trying to insert a java image (BufferedImage) into a Birt Report.
> I'm using a scripted data set to retrieve the buffered image from a java
> object and I am putting it into a Dynamic Image item with the expression
> set to row["BAR_CODE_IMAGE"] in my report template.
>
> When I run the report (from a within a java application) I get the
> following error message :
>
> Feb 9, 2006 10:37:50 AM
> org.eclipse.birt.report.engine.layout.impl.ImageLayoutManage r layout
> SEVERE: can't retrieve image intrinsic dimension!
>
> So I put some system.out code inside of the ImageLayoutManager.java in
> the "protected Dimension getIntrinsicDimension(IImageContent content)"
> method and I recompiled the class. Here is the output :
>
> >> Inside getIntrinsicDimension
> >> content.getAltText() : null
> >> content.getExtension() : null
> >> content.getGenerateBy() :
> org.eclipse.birt.report.engine.ir.ImageItemDesign@16fdac
> >> content.getImageMap() : null
> >> content.getImageSource() : 2
> >> content.getMIMEType() : null
> >> content.getName() : null
> >> content.getURI() : null
> >> content.getBounds() : null
> >> content.getChildren() : []
> >> content.getClass() : class >>
> content.org.eclipse.birt.report.engine.content.impl.ImageCon tent
> >> content.getComputedStyle() :
> org.eclipse.birt.report.engine.css.dom.ComputedStyle@1b2d7df
> >> content.getData() : null
> >> content.getHeight() : 62px
> >> content.getInstanceID() : /240(QuRs368224148:0)
> >> content.getParent() :
> org.eclipse.birt.report.engine.content.impl.CellContent@7a9224
> >> content.getReportContent() :
> org.eclipse.birt.report.engine.content.impl.ReportContent@19fdbcb
> >> content.getWidth() : 299px
>
>
> When I switch the report element to be a URI with an expression of
> row["BAR_CODE_IMAGE"] the call to content.getURI() returns
> >>content.getURI() : BufferedImage@363068: type = 1 DirectColorModel:
> rmask=ff0000 gmask=ff00 bmask=ff amask=0 IntegerInterleavedRaster: width
> = 191 height = 35 #Bands = 3 xOff = 0 yOff = 0 dataOffset[0] 0
>
> So I know that my row["BAR_CODE_IMAGE"] actually contains my buffered
> image.
>
> Do I have something set up wrong? Are java images not supported yet in
> Birt?
>
> Thank you for any help,
> florin
Re: Is this a dumb question? [message #138873 is a reply to message #138823] Fri, 03 March 2006 09:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fgheorghe.eprimepoint.com

I have yet to find a solution for this. We couldn't have been the only
two people to try to use java images in reports. Maybe its a known
limitation but I haven't found any documentation stating that. If I find
a solution I'll be sure to post it.

florin

Juergen Schwarz wrote:
> I have the same problem like you, so we seems to be both dumb!
> Any ideas to overcome this problem?
>
>
> Florin schrieb:
>
>> I searched bugzilla and I couldn't find any reference to this. I also
>> searched this newsgroup.
>>
>> I'm trying to insert a java image (BufferedImage) into a Birt Report.
>> I'm using a scripted data set to retrieve the buffered image from a
>> java object and I am putting it into a Dynamic Image item with the
>> expression set to row["BAR_CODE_IMAGE"] in my report template.
>>
>> When I run the report (from a within a java application) I get the
>> following error message :
>>
>> Feb 9, 2006 10:37:50 AM
>> org.eclipse.birt.report.engine.layout.impl.ImageLayoutManage r layout
>> SEVERE: can't retrieve image intrinsic dimension!
>>
>> So I put some system.out code inside of the ImageLayoutManager.java in
>> the "protected Dimension getIntrinsicDimension(IImageContent content)"
>> method and I recompiled the class. Here is the output :
>>
>> >> Inside getIntrinsicDimension
>> >> content.getAltText() : null
>> >> content.getExtension() : null
>> >> content.getGenerateBy() :
>> org.eclipse.birt.report.engine.ir.ImageItemDesign@16fdac
>> >> content.getImageMap() : null
>> >> content.getImageSource() : 2
>> >> content.getMIMEType() : null
>> >> content.getName() : null
>> >> content.getURI() : null
>> >> content.getBounds() : null
>> >> content.getChildren() : []
>> >> content.getClass() : class >>
>> content.org.eclipse.birt.report.engine.content.impl.ImageCon tent
>> >> content.getComputedStyle() :
>> org.eclipse.birt.report.engine.css.dom.ComputedStyle@1b2d7df
>> >> content.getData() : null
>> >> content.getHeight() : 62px
>> >> content.getInstanceID() : /240(QuRs368224148:0)
>> >> content.getParent() :
>> org.eclipse.birt.report.engine.content.impl.CellContent@7a9224
>> >> content.getReportContent() :
>> org.eclipse.birt.report.engine.content.impl.ReportContent@19fdbcb
>> >> content.getWidth() : 299px
>>
>>
>> When I switch the report element to be a URI with an expression of
>> row["BAR_CODE_IMAGE"] the call to content.getURI() returns
>> >>content.getURI() : BufferedImage@363068: type = 1 DirectColorModel:
>> rmask=ff0000 gmask=ff00 bmask=ff amask=0 IntegerInterleavedRaster:
>> width = 191 height = 35 #Bands = 3 xOff = 0 yOff = 0 dataOffset[0] 0
>>
>> So I know that my row["BAR_CODE_IMAGE"] actually contains my buffered
>> image.
>>
>> Do I have something set up wrong? Are java images not supported yet in
>> Birt?
>>
>> Thank you for any help,
>> florin
Re: Is this a dumb question? [message #138882 is a reply to message #138873] Fri, 03 March 2006 09:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fgheorghe.eprimepoint.com

I haven't tried this but one work around would be to to create the image
onto the hard drive in a temporary directory, then change the value of
the image field (using engine api's) to point to the location of the
image. I would then periodically delete all of the files in the temp
directory.

florin
Florin wrote:
> I have yet to find a solution for this. We couldn't have been the only
> two people to try to use java images in reports. Maybe its a known
> limitation but I haven't found any documentation stating that. If I find
> a solution I'll be sure to post it.
>
> florin
>
> Juergen Schwarz wrote:
>
>> I have the same problem like you, so we seems to be both dumb!
>> Any ideas to overcome this problem?
>>
>>
>> Florin schrieb:
>>
>>> I searched bugzilla and I couldn't find any reference to this. I also
>>> searched this newsgroup.
>>>
>>> I'm trying to insert a java image (BufferedImage) into a Birt Report.
>>> I'm using a scripted data set to retrieve the buffered image from a
>>> java object and I am putting it into a Dynamic Image item with the
>>> expression set to row["BAR_CODE_IMAGE"] in my report template.
>>>
>>> When I run the report (from a within a java application) I get the
>>> following error message :
>>>
>>> Feb 9, 2006 10:37:50 AM
>>> org.eclipse.birt.report.engine.layout.impl.ImageLayoutManage r layout
>>> SEVERE: can't retrieve image intrinsic dimension!
>>>
>>> So I put some system.out code inside of the ImageLayoutManager.java
>>> in the "protected Dimension getIntrinsicDimension(IImageContent
>>> content)" method and I recompiled the class. Here is the output :
>>>
>>> >> Inside getIntrinsicDimension
>>> >> content.getAltText() : null
>>> >> content.getExtension() : null
>>> >> content.getGenerateBy() :
>>> org.eclipse.birt.report.engine.ir.ImageItemDesign@16fdac
>>> >> content.getImageMap() : null
>>> >> content.getImageSource() : 2
>>> >> content.getMIMEType() : null
>>> >> content.getName() : null
>>> >> content.getURI() : null
>>> >> content.getBounds() : null
>>> >> content.getChildren() : []
>>> >> content.getClass() : class >>
>>> content.org.eclipse.birt.report.engine.content.impl.ImageCon tent
>>> >> content.getComputedStyle() :
>>> org.eclipse.birt.report.engine.css.dom.ComputedStyle@1b2d7df
>>> >> content.getData() : null
>>> >> content.getHeight() : 62px
>>> >> content.getInstanceID() : /240(QuRs368224148:0)
>>> >> content.getParent() :
>>> org.eclipse.birt.report.engine.content.impl.CellContent@7a9224
>>> >> content.getReportContent() :
>>> org.eclipse.birt.report.engine.content.impl.ReportContent@19fdbcb
>>> >> content.getWidth() : 299px
>>>
>>>
>>> When I switch the report element to be a URI with an expression of
>>> row["BAR_CODE_IMAGE"] the call to content.getURI() returns
>>> >>content.getURI() : BufferedImage@363068: type = 1
>>> DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0
>>> IntegerInterleavedRaster: width = 191 height = 35 #Bands = 3 xOff = 0
>>> yOff = 0 dataOffset[0] 0
>>>
>>> So I know that my row["BAR_CODE_IMAGE"] actually contains my buffered
>>> image.
>>>
>>> Do I have something set up wrong? Are java images not supported yet
>>> in Birt?
>>>
>>> Thank you for any help,
>>> florin
Re: Is this a dumb question? [message #139457 is a reply to message #138882] Mon, 06 March 2006 03:39 Go to previous message
Eclipse UserFriend
Originally posted by: juergen.schwarz.gefasoft.de

I tried to read the (.BMP) image directly from a BLOB column from the
(Oracle) database and this worked. So, I think the problem is perhaps
with the scripted datasource which returns this image not as binary data
but as a String.

Florin schrieb:
> I haven't tried this but one work around would be to to create the image
> onto the hard drive in a temporary directory, then change the value of
> the image field (using engine api's) to point to the location of the
> image. I would then periodically delete all of the files in the temp
> directory.
>
> florin
> Florin wrote:
>> I have yet to find a solution for this. We couldn't have been the only
>> two people to try to use java images in reports. Maybe its a known
>> limitation but I haven't found any documentation stating that. If I
>> find a solution I'll be sure to post it.
>>
>> florin
>>
>> Juergen Schwarz wrote:
>>
>>> I have the same problem like you, so we seems to be both dumb!
>>> Any ideas to overcome this problem?
>>>
>>>
>>> Florin schrieb:
>>>
>>>> I searched bugzilla and I couldn't find any reference to this. I
>>>> also searched this newsgroup.
>>>>
>>>> I'm trying to insert a java image (BufferedImage) into a Birt
>>>> Report. I'm using a scripted data set to retrieve the buffered image
>>>> from a java object and I am putting it into a Dynamic Image item
>>>> with the expression set to row["BAR_CODE_IMAGE"] in my report template.
>>>>
>>>> When I run the report (from a within a java application) I get the
>>>> following error message :
>>>>
>>>> Feb 9, 2006 10:37:50 AM
>>>> org.eclipse.birt.report.engine.layout.impl.ImageLayoutManage r layout
>>>> SEVERE: can't retrieve image intrinsic dimension!
>>>>
>>>> So I put some system.out code inside of the ImageLayoutManager.java
>>>> in the "protected Dimension getIntrinsicDimension(IImageContent
>>>> content)" method and I recompiled the class. Here is the output :
>>>>
>>>> >> Inside getIntrinsicDimension
>>>> >> content.getAltText() : null
>>>> >> content.getExtension() : null
>>>> >> content.getGenerateBy() :
>>>> org.eclipse.birt.report.engine.ir.ImageItemDesign@16fdac
>>>> >> content.getImageMap() : null
>>>> >> content.getImageSource() : 2
>>>> >> content.getMIMEType() : null
>>>> >> content.getName() : null
>>>> >> content.getURI() : null
>>>> >> content.getBounds() : null
>>>> >> content.getChildren() : []
>>>> >> content.getClass() : class >>
>>>> content.org.eclipse.birt.report.engine.content.impl.ImageCon tent
>>>> >> content.getComputedStyle() :
>>>> org.eclipse.birt.report.engine.css.dom.ComputedStyle@1b2d7df
>>>> >> content.getData() : null
>>>> >> content.getHeight() : 62px
>>>> >> content.getInstanceID() : /240(QuRs368224148:0)
>>>> >> content.getParent() :
>>>> org.eclipse.birt.report.engine.content.impl.CellContent@7a9224
>>>> >> content.getReportContent() :
>>>> org.eclipse.birt.report.engine.content.impl.ReportContent@19fdbcb
>>>> >> content.getWidth() : 299px
>>>>
>>>>
>>>> When I switch the report element to be a URI with an expression of
>>>> row["BAR_CODE_IMAGE"] the call to content.getURI() returns
>>>> >>content.getURI() : BufferedImage@363068: type = 1
>>>> DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0
>>>> IntegerInterleavedRaster: width = 191 height = 35 #Bands = 3 xOff =
>>>> 0 yOff = 0 dataOffset[0] 0
>>>>
>>>> So I know that my row["BAR_CODE_IMAGE"] actually contains my
>>>> buffered image.
>>>>
>>>> Do I have something set up wrong? Are java images not supported yet
>>>> in Birt?
>>>>
>>>> Thank you for any help,
>>>> florin
Previous Topic:problem with different app server
Next Topic:Very strang deployment problem
Goto Forum:
  


Current Time: Thu Jul 17 20:05:55 EDT 2025

Powered by FUDForum. Page generated in 0.04838 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top