Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java- Image height required  RSS feed

 
Tanu Gulati
Ranch Hand
Posts: 113
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a java program that loads a list of images from database in the array of bytes format. I wanted to get the height of each image and use it for further processing.
Below code when i run i can print height on console BUT I can not acess this height outiside this inner class. Any suggestions how can i get the height outside this inner class in my java program.



 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The scope of the Image and ImageObserver variables isn't deducible from your code fragment. To get better help sooner, post a SSCCE that clearly demonstrates your problem.
 
Tanu Gulati
Ranch Hand
Posts: 113
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got this problem resolved i used below code to get height of image.



Learned some thing new today hurray
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!