Difference between revisions of "Mipmap Generator 2D Manual"

From Immersive Visualization Lab Wiki
Jump to: navigation, search
m (Manual)
m
Line 2: Line 2:
  
 
;SYNOPSIS:
 
;SYNOPSIS:
:./MipmapGen2D [-f format -s brickSize] <u>imageFilename maxLevel
+
:./MipmapGen2D [-f <u>format</u> -s <u>brickSize</u>] <u>imageFilename</u> <u>maxLevel</u>
:./MipmapGen2D [-f format -s brickSize] inputBatchFilename maxLevel [outputBatchFilename]  
+
:./MipmapGen2D [-f <u>format</u> -s <u>brickSize</u>] <u>inputBatchFilename</u> <u>maxLevel</u> [<u>outputBatchFilename</u>]  
  
 
;DESCRIPTION:
 
;DESCRIPTION:
 
:'''Generate mipmaps for an image:'''
 
:'''Generate mipmaps for an image:'''
:Generate mipmaps for an image specified by imageFilename, from level 0 (the original image size) to the level specified by maxLevel. If the maxLevel is -1, MipmapGen2D generates all the mipmaps from the original image size to the biggest size smaller than the brickSize.  
+
:Generate mipmaps for an image specified by <u>imageFilename</u>, from level 0 (the original image size) to the level specified by <u>maxLevel</u>. If the <u>maxLevel</u> is -1, MipmapGen2D generates all the mipmaps from the original image size to the biggest size smaller than the <u>brickSize</u>.  
  
 
:'''Generate mipmaps for a set of images:'''
 
:'''Generate mipmaps for a set of images:'''
:Generate mipmaps for a set of images listed in the inputBatchFilename, all from level 0 (the original image size) to the level specified by maxLevel.   
+
:Generate mipmaps for a set of images listed in the inputBatchFilename</u>, all from level 0 (the original image size) to the level specified by maxLevel</u>.   
  
:If outputBatchFilename is specified, MipmapGen2D assumes the image set is an animation, and generates a single text file which lists mipmaps for each frame and timestamps. If outputBatchFilename is not specified, it’s the same as a batch mipmaps generation. MipmapGen2D generates mipmaps and a text file for each image in the set, as if they are generated separately.
+
:If <u>outputBatchFilename</u> is specified, MipmapGen2D assumes the image set is an animation, and generates a single text file which lists mipmaps for each frame and timestamps. If <u>outputBatchFilename</u> is not specified, it’s the same as a batch mipmaps generation. MipmapGen2D generates mipmaps and a text file for each image in the set, as if they are generated separately.
  
 
;OPTIONS:
 
;OPTIONS:
:'''-f format'''
+
:'''-f <u>format</u>'''
 
::Specify file format for the output mipmaps. Default is mix.
 
::Specify file format for the output mipmaps. Default is mix.
::sep: Save all pixels of a channel together, i.e. RRR…R, GGG…G, BBB…B
+
::'''sep''' Save all pixels of a channel together, i.e. RRR…R, GGG…G, BBB…B
::mix: Save channels of one pixel together, i.e. RGB, RGB, RGB…RGB  
+
::'''mix''' Save channels of one pixel together, i.e. RGB, RGB, RGB…RGB  
:'''-s brickSize'''
+
:'''-s <u>brickSize</u>'''
 
::Specify the brick size. Default is 128.
 
::Specify the brick size. Default is 128.
  
Line 26: Line 26:
  
 
;FILE FORMAT
 
;FILE FORMAT
:#Mipmaps
+
:'''1. Mipmaps'''
 
:For each mipmap level of an image, we divide the output mipmap into fixed size bricks (Fig. 1), and save all the bricks of one mipmap level to one file.
 
:For each mipmap level of an image, we divide the output mipmap into fixed size bricks (Fig. 1), and save all the bricks of one mipmap level to one file.
  
Line 32: Line 32:
 
:<div style="text-align: center;">Fig. 1</div>
 
:<div style="text-align: center;">Fig. 1</div>
  
:To access all data for one brick in one file I/O, we put all the pixels of one brick together. In addition, to make the calculation for file pointer offset easy, we save those bricks one by one continuously (Fig. 2). The output mipmaps are not human readable. However, if the TIFF format is used, one can view bricks by TIFF’s sub-image.
+
:To access all data for one brick in one file I/O, we put all the pixels of one brick together. In addition, to simplify the calculation for file pointer offset of one certain brick, we save those bricks one by one continuously (Fig. 2). The output mipmaps are not human readable. However, if the TIFF format is used, one can view bricks by TIFF’s sub-image.
  
 
:[[Image:MipmapGen2D fig2.jpg|300px|center]]
 
:[[Image:MipmapGen2D fig2.jpg|300px|center]]
 
:<div style="text-align: center;">Fig. 2</div>
 
:<div style="text-align: center;">Fig. 2</div>
 +
 +
:'''2. Text Files'''
 +
::1. Output text file
 +
::The output text file for a single input image contents the image definition, and file paths for all the mipmaps.

Revision as of 22:35, 1 April 2008

Generate mipmaps for 2D images.

SYNOPSIS
./MipmapGen2D [-f format -s brickSize] imageFilename maxLevel
./MipmapGen2D [-f format -s brickSize] inputBatchFilename maxLevel [outputBatchFilename]
DESCRIPTION
Generate mipmaps for an image:
Generate mipmaps for an image specified by imageFilename, from level 0 (the original image size) to the level specified by maxLevel. If the maxLevel is -1, MipmapGen2D generates all the mipmaps from the original image size to the biggest size smaller than the brickSize.
Generate mipmaps for a set of images:
Generate mipmaps for a set of images listed in the inputBatchFilename</u>, all from level 0 (the original image size) to the level specified by maxLevel</u>.
If outputBatchFilename is specified, MipmapGen2D assumes the image set is an animation, and generates a single text file which lists mipmaps for each frame and timestamps. If outputBatchFilename is not specified, it’s the same as a batch mipmaps generation. MipmapGen2D generates mipmaps and a text file for each image in the set, as if they are generated separately.
OPTIONS
-f format
Specify file format for the output mipmaps. Default is mix.
sep Save all pixels of a channel together, i.e. RRR…R, GGG…G, BBB…B
mix Save channels of one pixel together, i.e. RGB, RGB, RGB…RGB
-s brickSize
Specify the brick size. Default is 128.
VERSION
Current version only supports TIFF image. The input TIFF image should be uncompressed. Only the data chunk specified by the first image file directory (IFD) will be processed.
FILE FORMAT
1. Mipmaps
For each mipmap level of an image, we divide the output mipmap into fixed size bricks (Fig. 1), and save all the bricks of one mipmap level to one file.
MipmapGen2D fig1.jpg
Fig. 1
To access all data for one brick in one file I/O, we put all the pixels of one brick together. In addition, to simplify the calculation for file pointer offset of one certain brick, we save those bricks one by one continuously (Fig. 2). The output mipmaps are not human readable. However, if the TIFF format is used, one can view bricks by TIFF’s sub-image.
MipmapGen2D fig2.jpg
Fig. 2
2. Text Files
1. Output text file
The output text file for a single input image contents the image definition, and file paths for all the mipmaps.