 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Mario Guest
|
Posted: Wed Sep 21, 2005 12:03 pm Post subject: 2DGraphics vs JPEG |
|
|
Maybe I'm someone boring with my questions about way of displaying and
printing content of JPanel, but you must understand that all little tests
of my application don't give the speed I need and, the other thing is, that
examples on Net shows how to display and print pictures (jpg for example)
or 2DGraphics.
So, what is, memory and speed of displaying and printing, better:
1.
g2d.drawRectangle(...);
g2d.drawLine(...);
g2d.draw...
and so on, width: 210 mm x 6
height: 297 mm x 6
or
2. draw all that, saving as a jpg picture with the JAVA ADVANCED IMAGES
packages and than displaying and printing as a picture.
The content of a JPanel is a diagram which need to be continued (printing)
on a next pages, through the x-axis and the y-axis.
|
|
| Back to top |
|
 |
Oliver Wong Guest
|
Posted: Wed Sep 21, 2005 1:39 pm Post subject: Re: 2DGraphics vs JPEG |
|
|
"Mario" <mario_zupan (AT) inet (DOT) hr> wrote
| Quote: | Maybe I'm someone boring with my questions about way of displaying
and
printing content of JPanel, but you must understand that all little tests
of my application don't give the speed I need and, the other thing is,
that
examples on Net shows how to display and print pictures (jpg for example)
or 2DGraphics.
So, what is, memory and speed of displaying and printing, better:
1.
g2d.drawRectangle(...);
g2d.drawLine(...);
g2d.draw...
and so on, width: 210 mm x 6
height: 297 mm x 6
or
2. draw all that, saving as a jpg picture with the JAVA ADVANCED IMAGES
packages and than displaying and printing as a picture.
The content of a JPanel is a diagram which need to be continued (printing)
on a next pages, through the x-axis and the y-axis.
|
You say you're doing tests, so why not test this as well and give us
your results?
- Oliver
|
|
| Back to top |
|
 |
Roedy Green Guest
|
Posted: Wed Sep 21, 2005 4:39 pm Post subject: Re: 2DGraphics vs JPEG |
|
|
On Wed, 21 Sep 2005 14:03:20 +0200, Mario <mario_zupan (AT) inet (DOT) hr> wrote
or quoted :
| Quote: |
2. draw all that, saving as a jpg picture with the JAVA ADVANCED IMAGES
packages and than displaying and printing as a picture.
|
JPGs are for photographs. If you used that technique, you would use
PNG format.
It depends on how complex the drawing is and how much computation is
required to draw it which approach will be faster. You have to take
into account transmission time as well. You can do a quick check
which will be faster by simply displaying a dummy image and comparing
the speed of that with what you are doing now.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
|
|
| Back to top |
|
 |
Mario Guest
|
Posted: Thu Sep 22, 2005 8:08 am Post subject: Re: 2DGraphics vs JPEG |
|
|
Roedy Green wrote:
| Quote: | On Wed, 21 Sep 2005 14:03:20 +0200, Mario <mario_zupan (AT) inet (DOT) hr> wrote
or quoted :
2. draw all that, saving as a jpg picture with the JAVA ADVANCED IMAGES
packages and than displaying and printing as a picture.
JPGs are for photographs. If you used that technique, you would use
PNG format.
It depends on how complex the drawing is and how much computation is
required to draw it which approach will be faster. You have to take
into account transmission time as well. You can do a quick check
which will be faster by simply displaying a dummy image and comparing
the speed of that with what you are doing now.
|
OK. I will try with png. If you don't mind, I would like to send you a
JPanel content, just to see it. I tried once before on a
[email]look-on (AT) mindprod (DOT) com.inva[/email]lid
but without success. So, could you please send me a correct mail address. If
you don't mind, of course.
|
|
| Back to top |
|
 |
Roedy Green Guest
|
Posted: Thu Sep 22, 2005 8:28 am Post subject: Re: 2DGraphics vs JPEG |
|
|
On Thu, 22 Sep 2005 10:08:08 +0200, Mario <mario_zupan (AT) inet (DOT) hr> wrote
or quoted :
| Quote: | OK. I will try with png. If you don't mind, I would like to send you a
JPanel content, just to see it. I tried once before on a
[email]look-on (AT) mindprod (DOT) com.inva[/email]lid
but without success. So, could you please send me a correct mail address. If
you don't mind, of course.
|
That is a munged address containing the instructions of how to find my
email address which I don't want publicly posted. It is saying look
on http://mindprod.com the .invalid is warning you that is not it
itself a legit email address.
http://mindprod.com/feedback/feedback.html
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
|
|
| Back to top |
|
 |
Mario Guest
|
Posted: Thu Sep 22, 2005 8:51 am Post subject: Re: 2DGraphics vs JPEG |
|
|
I did. When I cath the time I must investigate your interesting site.
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|