本文整理汇总了Java中org.jaudiotagger.tag.images.Artwork.setImageFromData方法的典型用法代码示例。如果您正苦于以下问题:Java Artwork.setImageFromData方法的具体用法?Java Artwork.setImageFromData怎么用?Java Artwork.setImageFromData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jaudiotagger.tag.images.Artwork
的用法示例。
在下文中一共展示了Artwork.setImageFromData方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createMetadataBlockDataPicture
import org.jaudiotagger.tag.images.Artwork; //导入方法依赖的package包/类
/**
* Create MetadataBlockPicture field, this is the preferred way of storing artwork in VorbisComment tag now but
* has to be base encoded to be stored in VorbisComment
*
* @return MetadataBlockDataPicture
*/
private MetadataBlockDataPicture createMetadataBlockDataPicture(Artwork artwork) throws FieldDataInvalidException {
if (artwork.isLinked()) {
return new MetadataBlockDataPicture(
Utils.getDefaultBytes(artwork.getImageUrl(), TextEncoding.CHARSET_ISO_8859_1),
artwork.getPictureType(),
MetadataBlockDataPicture.IMAGE_IS_URL,
"",
0,
0,
0,
0);
} else {
if (!artwork.setImageFromData()) {
throw new FieldDataInvalidException("Unable to create MetadataBlockDataPicture from buffered");
}
return new MetadataBlockDataPicture(artwork.getBinaryData(),
artwork.getPictureType(),
artwork.getMimeType(),
artwork.getDescription(),
artwork.getWidth(),
artwork.getHeight(),
0,
0);
}
}
示例2: createMetadataBlockDataPicture
import org.jaudiotagger.tag.images.Artwork; //导入方法依赖的package包/类
private MetadataBlockDataPicture createMetadataBlockDataPicture(Artwork artwork) throws FieldDataInvalidException {
if (artwork.isLinked()) {
return new MetadataBlockDataPicture(
artwork.getImageUrl().getBytes(StandardCharsets.ISO_8859_1),
artwork.getPictureType(),
MetadataBlockDataPicture.IMAGE_IS_URL,
"",
0,
0,
0,
0);
} else {
if (!artwork.setImageFromData()) {
throw new FieldDataInvalidException("Unable to create MetadataBlockDataPicture from buffered");
}
return new MetadataBlockDataPicture(artwork.getBinaryData(),
artwork.getPictureType(),
artwork.getMimeType(),
artwork.getDescription(),
artwork.getWidth(),
artwork.getHeight(),
0,
0);
}
}
示例3: createField
import org.jaudiotagger.tag.images.Artwork; //导入方法依赖的package包/类
public TagField createField(Artwork artwork) throws FieldDataInvalidException {
if (artwork.isLinked()) {
return new MetadataBlockDataPicture(
artwork.getImageUrl().getBytes(StandardCharsets.ISO_8859_1),
artwork.getPictureType(),
MetadataBlockDataPicture.IMAGE_IS_URL,
"",
0,
0,
0,
0);
} else {
if (!artwork.setImageFromData()) {
throw new FieldDataInvalidException("Unable to createField buffered image from the image");
}
return new MetadataBlockDataPicture(artwork.getBinaryData(),
artwork.getPictureType(),
artwork.getMimeType(),
artwork.getDescription(),
artwork.getWidth(),
artwork.getHeight(),
0,
0);
}
}
示例4: createMetadataBlockDataPicture
import org.jaudiotagger.tag.images.Artwork; //导入方法依赖的package包/类
/**
* Create MetadataBlockPicture field, this is the preferred way of storing artwork in VorbisComment tag now but
* has to be base encoded to be stored in VorbisComment
*
* @return MetadataBlockDataPicture
*/
private MetadataBlockDataPicture createMetadataBlockDataPicture(Artwork artwork) throws FieldDataInvalidException
{
if(artwork.isLinked())
{
return new MetadataBlockDataPicture(
artwork.getImageUrl().getBytes(StandardCharsets.ISO_8859_1),
artwork.getPictureType(),
MetadataBlockDataPicture.IMAGE_IS_URL,
"",
0,
0,
0,
0);
}
else
{
if(!artwork.setImageFromData())
{
throw new FieldDataInvalidException("Unable to create MetadataBlockDataPicture from buffered");
}
return new MetadataBlockDataPicture(artwork.getBinaryData(),
artwork.getPictureType(),
artwork.getMimeType(),
artwork.getDescription(),
artwork.getWidth(),
artwork.getHeight(),
0,
0);
}
}
示例5: createField
import org.jaudiotagger.tag.images.Artwork; //导入方法依赖的package包/类
/**
* Create artwork field
*
* @return
*/
public TagField createField(Artwork artwork) throws FieldDataInvalidException
{
if(artwork.isLinked())
{
return new MetadataBlockDataPicture(
artwork.getImageUrl().getBytes(StandardCharsets.ISO_8859_1),
artwork.getPictureType(),
MetadataBlockDataPicture.IMAGE_IS_URL,
"",
0,
0,
0,
0);
}
else
{
if(!artwork.setImageFromData())
{
throw new FieldDataInvalidException("Unable to createField buffered image from the image");
}
return new MetadataBlockDataPicture(artwork.getBinaryData(),
artwork.getPictureType(),
artwork.getMimeType(),
artwork.getDescription(),
artwork.getWidth(),
artwork.getHeight(),
0,
0);
}
}
示例6: createField
import org.jaudiotagger.tag.images.Artwork; //导入方法依赖的package包/类
/**
* Create artwork field
*
* @return
*/
public TagField createField(Artwork artwork) throws FieldDataInvalidException {
if (artwork.isLinked()) {
return new MetadataBlockDataPicture(
Utils.getDefaultBytes(artwork.getImageUrl(), TextEncoding.CHARSET_ISO_8859_1),
artwork.getPictureType(),
MetadataBlockDataPicture.IMAGE_IS_URL,
"",
0,
0,
0,
0);
} else {
if (!artwork.setImageFromData()) {
throw new FieldDataInvalidException("Unable to createField buffered image from the image");
}
return new MetadataBlockDataPicture(artwork.getBinaryData(),
artwork.getPictureType(),
artwork.getMimeType(),
artwork.getDescription(),
artwork.getWidth(),
artwork.getHeight(),
0,
0);
}
}
示例7: createMetadataBlockDataPicture
import org.jaudiotagger.tag.images.Artwork; //导入方法依赖的package包/类
/**
* Create MetadataBlockPicture field, this is the preferred way of storing artwork in VorbisComment tag now but
* has to be base encoded to be stored in VorbisComment
*
* @return MetadataBlockDataPicture
*/
private MetadataBlockDataPicture createMetadataBlockDataPicture(Artwork artwork) throws FieldDataInvalidException
{
if(artwork.isLinked())
{
return new MetadataBlockDataPicture(
Utils.getDefaultBytes(artwork.getImageUrl(), TextEncoding.CHARSET_ISO_8859_1),
artwork.getPictureType(),
MetadataBlockDataPicture.IMAGE_IS_URL,
"",
0,
0,
0,
0);
}
else
{
if(!artwork.setImageFromData())
{
throw new FieldDataInvalidException("Unable to create MetadataBlockDataPicture from buffered");
}
return new MetadataBlockDataPicture(artwork.getBinaryData(),
artwork.getPictureType(),
artwork.getMimeType(),
artwork.getDescription(),
artwork.getWidth(),
artwork.getHeight(),
0,
0);
}
}
示例8: createField
import org.jaudiotagger.tag.images.Artwork; //导入方法依赖的package包/类
/**
* Create artwork field
*
* @return
*/
public TagField createField(Artwork artwork) throws FieldDataInvalidException
{
if(artwork.isLinked())
{
return new MetadataBlockDataPicture(
Utils.getDefaultBytes(artwork.getImageUrl(), TextEncoding.CHARSET_ISO_8859_1),
artwork.getPictureType(),
MetadataBlockDataPicture.IMAGE_IS_URL,
"",
0,
0,
0,
0);
}
else
{
if(!artwork.setImageFromData())
{
throw new FieldDataInvalidException("Unable to createField buffered image from the image");
}
return new MetadataBlockDataPicture(artwork.getBinaryData(),
artwork.getPictureType(),
artwork.getMimeType(),
artwork.getDescription(),
artwork.getWidth(),
artwork.getHeight(),
0,
0);
}
}