←Select platform

UuidUrl Structure

Summary
A Uniform Resource Locator (URL)containing more information about the associated vendor-specific extensions.

Syntax
C#
C++/CLI
Python
public struct UuidUrl 
public value class UuidUrl : public System.ValueType  
class UuidUrl: 
Remarks

The Data Entry URL box contains an Uniform Resource Locator (URL), which is used by an application to acquire more information about the associated vendor-specific extensions. The URL type should be the kind that delivers a file (for example, files, http, ftp, etc.). Ideally it permits random access. Relative URLs are permissible and are relative to the file containing this Data Entry URL box. This box is defined in JP2 and above file formats.

Example
C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.Jpeg2000; 
 
 
public void FragmentJpxFileExample() 
{ 
   Jpeg2000Engine engine = new Jpeg2000Engine(); 
 
   Jpeg2000FileInformation fileInfo = engine.GetFileInformation(Path.Combine(LEAD_VARS.ImagesDir, "image1.jpx")); 
 
   if (1 > fileInfo.CodeStream.GetLength(0)) 
      return; 
 
   List<int> frames = new List<int>(); 
   frames.Add(0); 
   UuidUrl url = new UuidUrl(); 
   url.Flag = new byte[3]; 
   url.Flag[0] = 0; 
   url.Flag[1] = 0; 
   url.Flag[2] = 0; 
   url.Version = 0; 
   String loaction = Path.Combine(LEAD_VARS.ImagesDir, "codestream.bin"); 
   byte[] data = Encoding.ASCII.GetBytes(loaction); 
   url.Location = new byte[data.GetLength(0)]; 
   data.CopyTo(url.Location, 0); 
 
   List<UuidUrl> urls = new List<UuidUrl>(); 
   urls.Add(url); 
   Fragment fragment = new Fragment(); 
   fragment.CodeStreamIndex = 0; 
   fragment.Offset = 0; 
   fragment.UrlIndex = 0; 
   List<Fragment> fragments = new List<Fragment>(); 
   fragments.Add(fragment); 
   engine.FragmentJpxFile(Path.Combine(LEAD_VARS.ImagesDir, "image1.jpx"), Path.Combine(LEAD_VARS.ImagesDir, "Test.jpx"), urls, fragments); 
} 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS23\Resources\Images"; 
} 
Requirements

Target Platforms

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.