Example #1
0
 /**
  * Should be called when you wish to prime the artwork for saving
  *
  * @return
  */
 public boolean setImageFromData() {
   try {
     BufferedImage image = (BufferedImage) getImage();
     setWidth(image.getWidth());
     setHeight(image.getHeight());
   } catch (IOException ioe) {
     return false;
   }
   return true;
 }
Example #2
0
 /**
  * Populate Artwork from MetadataBlockDataPicture as used by Flac and VorbisComment
  *
  * @param coverArt
  */
 public void setFromMetadataBlockDataPicture(MetadataBlockDataPicture coverArt) {
   setMimeType(coverArt.getMimeType());
   setDescription(coverArt.getDescription());
   setPictureType(coverArt.getPictureType());
   if (coverArt.isImageUrl()) {
     setLinked(coverArt.isImageUrl());
     setImageUrl(coverArt.getImageUrl());
   } else {
     setBinaryData(coverArt.getImageData());
   }
   setWidth(coverArt.getWidth());
   setHeight(coverArt.getHeight());
 }