• 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

Image Filter problems

 
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI,
I'm having trouble with displaying part of an image in an applet. This is the code I'm trying:
[code]
// Image2 is declared elsewhere
Image2 = getImage( getDocumentBase() , "palm1.jpg" ) ;
Image2.CropImageFilter(xpos-20, ypos -20, 40, 40 );
[end of code]
The error message I get is:
cannot resolve symbol
symbol : method CropImageFilter(int,int,int,int)
location : java.awt.Image
Image2.CropImageFilter(xpos-20, ypos -20, 40, 40 );
^
Any ideas??
Thanks,
Terry
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
CropImageFilter is not a method of the java.awt.Image class... it's a class in the java.awt.image package...

Here's an example program that shows how to use it... ( Replace "Washu.gif" with whatever image you are using... )



-Nate
 
The fastest and most reliable components of any system are those that are not there. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic