←Select platform

Jpeg2000BoxType Enumeration

Summary
This enumeration specifies the JPEG 2000 box type.

Syntax
C#
C++/CLI
Python
public enum Jpeg2000BoxType 
public enum class Jpeg2000BoxType : public System.Enum, System.IComparable, System.IConvertible, System.IFormattable   
class Jpeg2000BoxType(Enum): 
   ResolutionBox = 11 
   IprBox = 12 
   XmlBox = 13 
   UuidBox = 14 
   UuidInformationBox = 15 
   Mpeg7Box = 16 
   FreeBox = 17 
   BinaryFilterBox = 18 
   GtsoBox = 19 
   CompositionBox = 20 
   DigitalSignatureBox = 21 
   AssociationBox = 22 
   MediaDataBox = 23 
Members
ValueMemberDescription
11ResolutionBoxResolution box.
12IprBoxIntellectual property rights box.
13XmlBoxXML box.
14UuidBoxUUID box.
15UuidInformationBoxUUID information box.
16Mpeg7BoxMPEG-7 box.
17FreeBoxFree box.
18BinaryFilterBoxBinary filter box.
19GtsoBoxDesired reproduction box.
20CompositionBoxComposition box
21DigitalSignatureBoxDigital signature box.
22AssociationBoxAssociation box.
23MediaDataBoxMedia data box
Example
C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.Jpeg2000; 
 
 
public void SaveStringExample() 
{ 
   RasterCodecs codecs = new RasterCodecs(); 
   codecs.ThrowExceptionsOnInvalidImages = true; 
 
   // Load a JPEG 2000 image 
   Jpeg2000Engine engine = new Jpeg2000Engine(); 
   RasterImage image = engine.Load(codecs, Path.Combine(LEAD_VARS.ImagesDir, "image1.jp2"), 0, CodecsLoadByteOrder.BgrOrGray); 
 
   List<XmlBox> xmlBoxes = engine.GetBoxes<XmlBox>(Jpeg2000FileFormat.LeadJp2); 
   ResolutionBox resBox = (ResolutionBox)engine.GetBox(Jpeg2000FileFormat.LeadJp2, Jpeg2000BoxType.ResolutionBox); 
 
   engine.ResetEngineBoxes(); 
   //Set the JPX engine's XML box 
   engine.SetBoxes(Jpeg2000FileFormat.LeadJpx, xmlBoxes); 
   engine.SetBox(Jpeg2000FileFormat.LeadJpx, resBox); 
   //Save the image in JPX file format 
   engine.Save(codecs, Path.Combine(LEAD_VARS.ImagesDir, "Test.jpx"), image, Jpeg2000FileFormat.LeadJpx, 24, 5); 
   //Append Intellectual Property Rights box 
   String copyRights = ("Copyright (c) 1991-2022 by LEAD Technologies, Inc. All Rights Reserved."); 
   IprBox ipr = new IprBox(); 
   ipr.Data = Encoding.ASCII.GetBytes(copyRights); 
   engine.AppendBox(Path.Combine(LEAD_VARS.ImagesDir, "Test.jpx"), ipr); 
   // Clean up 
   engine.Dispose();          
   image.Dispose(); 
   codecs.Dispose(); 
} 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS23\Resources\Images"; 
} 
Requirements

Target Platforms

See Also

Reference

Leadtools.Jpeg2000 Namespace

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Jpeg2000 Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.