Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.help > #2811

Re: Print BufferedImage the result is blank

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From Knute Johnson <september@knutejohnson.com>
Newsgroups comp.lang.java.help
Subject Re: Print BufferedImage the result is blank
Date Tue, 15 Oct 2013 07:53:05 -0700
Organization A noiseless patient Spider
Lines 37
Message-ID <l3jksg$fdk$1@dont-email.me> (permalink)
References <103e51b9-a464-4d94-b3e6-e752f014e546@googlegroups.com> <14ww5aew55900.4b6f4igi40pg.dlg@40tude.net>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Tue, 15 Oct 2013 14:53:04 +0000 (UTC)
Injection-Info mx05.eternal-september.org; posting-host="aba33539224e5c782fe0c4053f7756fd"; logging-data="15796"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+my/dPJLjo5ArSwiD2xES4"
User-Agent Mozilla/5.0 (Windows NT 6.2; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.0.1
In-Reply-To <14ww5aew55900.4b6f4igi40pg.dlg@40tude.net>
Cancel-Lock sha1:kGSdOxHcRLF5agPhEchvL6t+Rno=
Xref csiph.com comp.lang.java.help:2811

Show key headers only | View raw


On 10/15/2013 4:27 AM, Joerg Meier wrote:
> On Tue, 15 Oct 2013 01:56:33 -0700 (PDT), p7371464@gmail.com wrote:
>
>> OS: Win 7 64 bit
>> Java: java version "1.6.0_29" 32 bit
>
> And that didn't strike you as odd ? I recommend starting by getting the
> upropriate (and current) version of Java for your machine. Your Java
> version is two years old and has many large and dangerous security flaws.
> Note that Java 7 is the current version. Java 6 is no longer even supported
> officially.
>
> As for your problem, you are not giving the image any time to load, and
> proceed to trying to print it without ever even checking if it was finished
> loading, or loaded even partially.
>
> I'm pretty rusty at loading Images through Java libraries, so I hope this
> is the apropriate way, if not, maybe someone else here could correct me.
> You get a decent example at
>
> <http://docs.oracle.com/javase/7/docs/api/java/awt/MediaTracker.html>
>
> and you don't need to worry about the Applet crap, but MediaTracker does
> need a Component for some obscure reason. You can simply pass it a new
> JFrame() and all should be good.
>
> Liebe Gruesse,
> 		Joerg
>

I'm not sure what his problem is but waiting for the image to load isn't 
it.  javax.ImageIO.read() loads the complete image before returning from 
the call.

-- 

Knute Johnson

Back to comp.lang.java.help | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Print BufferedImage the result is blank p7371464@gmail.com - 2013-10-15 01:56 -0700
  Re: Print BufferedImage the result is blank Joerg Meier <joergmmeier@arcor.de> - 2013-10-15 13:27 +0200
    Re: Print BufferedImage the result is blank Knute Johnson <september@knutejohnson.com> - 2013-10-15 07:53 -0700
  Re: Print BufferedImage the result is blank Jeff Higgins <jeff@invalid.invalid> - 2013-10-15 12:04 -0400
  Re: Print BufferedImage the result is blank Knute Johnson <september@knutejohnson.com> - 2013-10-15 19:43 -0700

csiph-web