Integrate fix advised by Heng Sin to solve a problem rendering images from AD_Client.Logo_ID on jasper reports
This commit is contained in:
parent
45200670fb
commit
4882320f29
|
@ -16,7 +16,9 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package org.compiere.model;
|
package org.compiere.model;
|
||||||
|
|
||||||
|
import java.awt.Container;
|
||||||
import java.awt.Image;
|
import java.awt.Image;
|
||||||
|
import java.awt.MediaTracker;
|
||||||
import java.awt.Toolkit;
|
import java.awt.Toolkit;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
@ -116,7 +118,10 @@ public class MImage extends X_AD_Image
|
||||||
{
|
{
|
||||||
Toolkit tk = Toolkit.getDefaultToolkit();
|
Toolkit tk = Toolkit.getDefaultToolkit();
|
||||||
m_image = tk.createImage(data);
|
m_image = tk.createImage(data);
|
||||||
return m_image;
|
MediaTracker mediaTracker = new MediaTracker(new Container());
|
||||||
|
mediaTracker.addImage(m_image, 0);
|
||||||
|
mediaTracker.waitForID(0);
|
||||||
|
return m_image;
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -132,6 +137,9 @@ public class MImage extends X_AD_Image
|
||||||
{
|
{
|
||||||
Toolkit tk = Toolkit.getDefaultToolkit();
|
Toolkit tk = Toolkit.getDefaultToolkit();
|
||||||
m_image = tk.getImage(url);
|
m_image = tk.getImage(url);
|
||||||
|
MediaTracker mediaTracker = new MediaTracker(new Container());
|
||||||
|
mediaTracker.addImage(m_image, 0);
|
||||||
|
mediaTracker.waitForID(0);
|
||||||
return m_image;
|
return m_image;
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|
Loading…
Reference in New Issue