本文整理匯總了Java中javax.imageio.metadata.IIOMetadataNode.setUserObject方法的典型用法代碼示例。如果您正苦於以下問題:Java IIOMetadataNode.setUserObject方法的具體用法?Java IIOMetadataNode.setUserObject怎麽用?Java IIOMetadataNode.setUserObject使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javax.imageio.metadata.IIOMetadataNode
的用法示例。
在下文中一共展示了IIOMetadataNode.setUserObject方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getNativeNode
import javax.imageio.metadata.IIOMetadataNode; //導入方法依賴的package包/類
IIOMetadataNode getNativeNode() {
IIOMetadataNode node = new IIOMetadataNode("unknown");
node.setAttribute("MarkerTag", Integer.toString(tag));
node.setUserObject(data);
return node;
}
示例2: configureMetaData
import javax.imageio.metadata.IIOMetadataNode; //導入方法依賴的package包/類
/**
* Configures the per frame metadata
*
* @param meta the default meta data
* @param delayTime the amount of time a frame is to stay on screen in hundreds of a second (millisecond value/10)
* @param imageIndex the index of this frame
* @throws IIOInvalidTreeException if the meta data cannot be set
*/
private void configureMetaData(IIOMetadata meta, String delayTime, int imageIndex) throws IIOInvalidTreeException {
String metaFormat = meta.getNativeMetadataFormatName();
Node root = meta.getAsTree(metaFormat);
Node child = root.getFirstChild();
while (child != null) {
if ("GraphicControlExtension".equals(child.getNodeName())) {
break;
}
child = child.getNextSibling();
}
IIOMetadataNode gce = (IIOMetadataNode) child;
gce.setAttribute("userDelay", "FALSE");
gce.setAttribute("delayTime", delayTime);
gce.setAttribute("disposalMethod", "none");
if (imageIndex == 0) {
IIOMetadataNode aes = new IIOMetadataNode("ApplicationExtensions");
IIOMetadataNode ae = new IIOMetadataNode("ApplicationExtension");
ae.setAttribute("applicationID", "NETSCAPE");
ae.setAttribute("authenticationCode", "2.0");
byte[] uo = new byte[] { 0x1, (byte) (LOOP_COUNT & 0xFF), (byte) ((LOOP_COUNT >> 8) & 0xFF) };
ae.setUserObject(uo);
aes.appendChild(ae);
root.appendChild(aes);
}
meta.setFromTree(metaFormat, root);
}
示例3: getNativeNode
import javax.imageio.metadata.IIOMetadataNode; //導入方法依賴的package包/類
/**
* Returns an <code>IIOMetadataNode</code> containing the data array
* as a user object and a string encoded using ISO-8895-1, as an
* attribute.
*/
IIOMetadataNode getNativeNode() {
IIOMetadataNode node = new IIOMetadataNode("com");
node.setAttribute("comment", getComment());
if (data != null) {
node.setUserObject(data.clone());
}
return node;
}
示例4: getNativeNode
import javax.imageio.metadata.IIOMetadataNode; //導入方法依賴的package包/類
IIOMetadataNode getNativeNode() {
IIOMetadataNode node = new IIOMetadataNode("dqtable");
node.setAttribute("elementPrecision",
Integer.toString(elementPrecision));
node.setAttribute("qtableId",
Integer.toString(tableID));
node.setUserObject(new JPEGQTable(data));
return node;
}
示例5: getNativeNode
import javax.imageio.metadata.IIOMetadataNode; //導入方法依賴的package包/類
IIOMetadataNode getNativeNode() {
IIOMetadataNode node = new IIOMetadataNode("dhtable");
node.setAttribute("class", Integer.toString(tableClass));
node.setAttribute("htableId", Integer.toString(tableID));
node.setUserObject(new JPEGHuffmanTable(numCodes, values));
return node;
}
示例6: getNativeNode
import javax.imageio.metadata.IIOMetadataNode; //導入方法依賴的package包/類
IIOMetadataNode getNativeNode() {
IIOMetadataNode node = new IIOMetadataNode("app2ICC");
if (profile != null) {
node.setUserObject(ICC_Profile.getInstance(profile));
}
return node;
}
示例7: addChildNode
import javax.imageio.metadata.IIOMetadataNode; //導入方法依賴的package包/類
private IIOMetadataNode addChildNode(IIOMetadataNode root,
String name,
Object object) {
IIOMetadataNode child = new IIOMetadataNode(name);
if (object != null) {
child.setUserObject(object);
child.setNodeValue(ImageUtil.convertObjectToString(object));
}
root.appendChild(child);
return child;
}
示例8: getNativeNode
import javax.imageio.metadata.IIOMetadataNode; //導入方法依賴的package包/類
/**
* Returns an {@code IIOMetadataNode} containing the data array
* as a user object and a string encoded using ISO-8895-1, as an
* attribute.
*/
IIOMetadataNode getNativeNode() {
IIOMetadataNode node = new IIOMetadataNode("com");
node.setAttribute("comment", getComment());
if (data != null) {
node.setUserObject(data.clone());
}
return node;
}