inheriting BufferedImage and using ImageIO.read()



So, I have a SubImage class which extends BufferedImage and I would like to use ImageIO.read() to create a SubImage, but since it returns a BufferedImage, I can't find a way of doing that.
Should I be using another design? or is there a way to get past this problem?
I would also add that right now my SubImage simply adds methods to the BufferedImage class. Yet downcasting causes an exception.
.



Relevant Pages

  • Re: inheriting BufferedImage and using ImageIO.read()
    ... returns a BufferedImage, I can't find a way of doing that. ... I would also add that right now my SubImage simply adds ... implementation for medical imaging data. ... metadata, composition works particularly well. ...
    (comp.lang.java.help)
  • Re: inheriting BufferedImage and using ImageIO.read()
    ... BufferedImage, I can't find a way of doing that. ... I would also add that right now my SubImage simply adds methods to the ... Somebody have the FAQ for asking smart questions handy? ... Between that and http://sscce.org/ we should be able to help this guy if he follows that advice. ...
    (comp.lang.java.help)