Package ca.eandb.jmist.framework.loader.openexr.attribute

Examples of ca.eandb.jmist.framework.loader.openexr.attribute.Attribute


      String type = StreamUtil.readNullTerminatedString(source);
      int size = source.readInt();

      source.flush();
      Attribute attribute = factory.create(type, size, source);

      if (attribute != null) {
        attributes.put(name, attribute);
      }
View Full Code Here


    out.setByteOrder(ByteOrder.LITTLE_ENDIAN);
    out.writeInt(MAGIC);
    out.writeInt(VERSION);

    for (Map.Entry<String, Attribute> entry : attributes.entrySet()) {
      Attribute attr = entry.getValue();
      String name = entry.getKey();
      String type = attr.getClass().getAnnotation(OpenEXRAttributeType.class).value();
      out.writeBytes(name);
      out.writeByte(0);
      out.writeBytes(type);
      out.writeByte(0);
      out.flush();
      long attrStart = out.getStreamPosition() + 4;
      out.seek(attrStart);
      attr.write(out);
      long attrEnd = out.getStreamPosition();
      out.seek(out.getFlushedPosition());
      out.writeInt((int) (attrEnd - attrStart));
      out.seek(attrEnd);
      out.flush();
View Full Code Here

TOP

Related Classes of ca.eandb.jmist.framework.loader.openexr.attribute.Attribute

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.