Announcement

Collapse
No announcement yet.

png-Dateien in Java anzeigen

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • png-Dateien in Java anzeigen

    hallo

    weis einer wie man png-dateien in java anzeigen kann?

    rainer

  • #2
    Hallo Rainer,

    mit java.awt.Toolkit zum Beispiel geht das:

    public abstract Image getImage(String filename)
    Returns an image which gets pixel data from the specified file, whose format can be either GIF, JPEG or PNG. The underlying toolkit attempts to resolve multiple requests with the same filename to the same returned Image. Since the mechanism required to facilitate this sharing of Image objects may continue to hold onto images that are no longer of use for an indefinate period of time, developers are encouraged to implement their own caching of images by using the createImage variant wherever available.
    Parameters:
    filename - the name of a file containing pixel data in a recognized file format.
    Returns:
    an image which gets its pixel data from the specified file.

    Thoma

    Comment

    Working...
    X