• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Trying to load an image and modifying it....

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!

I am trying to load an image (background) which I can later modify using the drawString, drawRect, etc... methods of the Graphics class (the JVM I must use is 1.1.8 and it cannot be changed so I believe forces me to use Graphics instead of Graphics2D)..

I tried to load the image and draw on it and that didn't work (it crashed...) so I tried to create a new image and draw the first one on it and while that didn't crash the image was never actually drawn on the first...

Is there a known good way to do what I want to do (and that works with such an old JDK...)?

Thanks!

Nick
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
don't know how compliant this is with 1.1.8 (can't test it)

 
Nick St-Peter
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks!!!

I can't test for now as I don't have such an old JVM at home either...

Have a nice day!

Nick
 
Nick St-Peter
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[browser just crashed so I have to retype everything... ]

O.k.

I got it to work, at least partially, by combining some parts of the code above with some info I found elsewhere on the web...

The problem I have now is that everything is in gray scale... I had read somewhere that this could be an issue with that JDK (1.1) but I thought it was only when drawImage() was used but even if I don't use it everything is still in black & white...

Was JDK 1.1 limited to using only gray scale graphics, I find this hard to believe...

Nick

PS: Thanks Jeff for telling me where I could delete my previous post...
 
Did you ever grow anything in the garden of your mind? - Fred Rogers. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic