當前位置: 首頁>>代碼示例>>Java>>正文


Java IIOMetadataNode.setUserObject方法代碼示例

本文整理匯總了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;
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:8,代碼來源:MarkerSegment.java

示例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);		
}
 
開發者ID:KodeMunkie,項目名稱:imagetozxspec,代碼行數:36,代碼來源:GifConverter.java

示例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;
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:14,代碼來源:COMMarkerSegment.java

示例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;
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:10,代碼來源:DQTMarkerSegment.java

示例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;
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:10,代碼來源:DHTMarkerSegment.java

示例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;
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:8,代碼來源:JFIFMarkerSegment.java

示例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;
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:12,代碼來源:WBMPMetadata.java

示例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;
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:14,代碼來源:COMMarkerSegment.java


注:本文中的javax.imageio.metadata.IIOMetadataNode.setUserObject方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。