-
JPEGIMG: Conversion between JPEG and IMG or BMP raster formats
Direct access to online help: JPEGIMG
Access the application from the menu:
"File | Import | Rasters | JPEG -> IMG/BMP"
"File | Export | IMG/BMP -> JPEG"
Presentation and options
This application converts between the MiraMon IMG format or the BMP format (without georeferencing), to the JPEG format with MiraMon metadata, or the JPEG format (without georeferencing). There are several options:
Header information:
(Option 0) Shows metadata
IMG/BMP to JPEG:
(Option 1) Converts IMG/BMP to JPEG. In this option a BMP, or an IMG image with a grey scale palette, or an IMG with a P25 palette or an RGB combination are converted to a single JPEG file.
JPEG to IMG/BMP:
(Option 2) From JPEG to IMG/BMP: This option converts a JPEG file to a BMP file , or to an IMG file with a grey scale palette, or to an IMG file with a predefined P25 palette, or to an IMG file with an optimised P25 palette, o to an RGB combination.
IMG/BMP to JPEG Indexat:
(Option 3) Convert IMG/BMP to a indexed JPEG convert IMG/BMP to JPEG. In this option a BMP, or an IMG image with a grey scale palette, or an IMG with a P25 palette or an RGB combination are converted to a single Indexed JPEG file.
Joint Photographic Experts Group (JPEG) refers to a still-picture compression standard that specifies several modes of operation. The mode used by the Independent JPEG Group's (IJPEG) software is sequential buildup (knowkn as JFIF); in this mode, each component of an image is encoded in a left-to-right and top-to-bottom scan. Sequential mode is lossy, which means that when you compress an image, you will lose information. One reason that sequential mode JPEG is lossy is that the algorithm compresses an image by removing visually insignificant information, colors that the human eye cannot detect. The JPEG committee has not specified a standard file format, and consequently, many applications of the JPEG algorithm use their own proprietary format. In spite of that, last years, JFIF format has been consolidated as an standard 'de facto'. For that reason MiraMon decided to incorporate this implementatión of JPEG format as a raster image format.
MiraMon uses the IMG format for categorical and continuous value rasters, whether in uncompressed format (in many cases compatible with Idrisi 16) or in the highly compressed RLE format. For more details about the IMG formats and how to convert between them consult either the on-line help ImgImg or the MiraMon manual. The RLE compression used in the IMG format is not lossy, meaning that the raster can be compressed and later uncompressed to recover the original image with no changes to the cell values. In the category images this property is essential given that two close numerical values may represent completely different categories. It is also important when dealing with radiometric images (remote sensing) where the value of a pixel represents a physical measurement of electromagnetic radiation.
On the other hand, the IJPEG implementation of the JPEG format is a high compression format but with some degradation or loss; the values of the uncompressed image approximate those of the original image but they are not always the same. The level of degradation can be controlled with a parameter (/QUALITAT) during compression, but it can never be eliminated altogether. Visually the results are very good, even with low quality levels (higher compression rate); for this reason the format is appropriate for photographic images such as orthometric aerial photographs in black and white or colour (whether they are 24 bit or 8 bit images with colour palettes). It is also a suitable format for continuous value images when you want a high compresion ratio with a good visual look but lossing the original values of the image.
For the JPEG format the application saves the metadata (including the georeference) in an REL v.4 file. Thanks to this property, MiraMon can visualize georeferenced files in JPEG format; they need fewer disk space and are perfectly integraded in the GIS. It is also possible to import or generate files without metadata for display in an image processing program.
When generating a JPEG file the application takes account of NODATA vales and, where possible, reserves a colour to represent this value.
This version only allows and generates palettes in P25 format. Convert them from MiraMon if necessary using the option 'Guardar paleta'. The RGB combination should be made up of 3 files in IMG byte format or byte-RLE format. If combinations with other formats are required display a 24 bit combination from MiraMon and save the displayed images as a BMP from the file menu of MiraMon; then convert the BMP to JPEG.

Dialog box of the application

Syntax
Syntax:
- JPEGIMG 0 JPEGFile /Stdout
- JPEGIMG 1 JPEGFile IMGBMPFile [/FitxerP25] [/QUALITAT] [/GRISOS] [/OPTIMITZAT] [/PROGRESSIU] [/DENOM_ESCALA] [/NO_METADADES]
- JPEGIMG 2 JPEGFile IMGBMPFile [/FitxerP25] [/NCOLORS] [/MAP_PAL] [/NO_SUAVIZAT] [/1PAS] [/ESCALAT] [/FWORLD]
- JPEGIMG 3 JPEGFile IMGBMPFile [/FitxerP25] [/QUALITAT] [/NO_METADADES] [/FWORLD] [/NFIL_PAQUET] [/QUICKLOOK]
- JPEGIMG 1 JPEGFile RFile GFile BFile [/QUALITAT] [/GRISOS] [/OPTIMITZAT] [/PROGRESSIU] [/DENOM_ESCALA] [/NO_METADADES]
- JPEGIMG 2 JPEGFile RFile GFile BFile [/NCOLORS] [/MAP_PAL] [/NO_SUAVIZAT] [/1PAS] [/ESCALAT] [/FWORLD]
- JPEGIMG 3 JPEGFile RFile GFile BFile [/QUALITAT] [/NO_METADADES] [/FWORLD] [/NFIL_PAQUET] [/QUICKLOOK]
Options:
- 0:
Shows metadata
- 1:
Conversion of IMG/BMP file to JPEG.
- 2:
Conversion of JPEG file to IMG/BMP.
- 3:
Conversion of IMG/BMP file to indexed JPEG.
Parameters:
- JPEGFile
(JPEG File -
Input parameter): Is the name of the JPEG file that we want o extract the metadata information.
- IMGBMPFile
(IMG/BMP File -
Input parameter): Is the name of the IMG or BMP file.
- RFile
(Red File -
Input parameter): Red band file
- GFile
(Green File -
Input parameter): Green band file
- BFile
(Blue File -
Input parameter): Blue band file
Modifiers:
/Stdout=
(Output standard)
Metadata information from the JPEG file. (Output parameter) /FitxerP25= (P25 file) Is the name of the colours palette that will be used to represent the JPEG. (Input parameter) /GRISOS (Greys) Creates a grey scale JPEG: converting a colour raster to grey scale (monochrome). (Input parameter) /OPTIMITZAT (Optimise) Optimise the Huffman table (the file will be smaller but the compression will be slower). (Input parameter) /PROGRESSIU (Progressive) Creates a progressive JPEG. This type of JPG permits preview during the first phases of uncompression. (Input parameter) /DENOM_ESCALA= (Scale denominator) Denominator of the scale at which the JPEG should be printed, or 0 if the user does not wish to specify a scale. The information about the raster cell size, together with this parameter are used to save internally in the JPEG file the output image pixel size in paper units, such as ppi (pixels per inch). (Input parameter) /NCOLORS= (Number of colours) Forces a reduction of the colour space to a limited number of colours, n. This will be the final number of colours in the palette if IMG+optimised palette is requested. (Input parameter) /MAP_PAL (Specific Palette) Forces the colour space to a specific palette. Note that if this option is selected the application reads the indicated palette from disk. If this option is not selected the application writes an optimised palette for this particular image. (Input parameter) /NO_SUAVIZAT (No smoothing) Allows not passing the smoothing filter to improve the final results. (Input parameter) /1PAS (One step) Use only one quantization pass. The result is obtained quicker but with lower quality. It requares fewer memory. (Input parameter) /ESCALAT= (Escala) m/n Output scale expressed as a fraction m/n, e.g: 1/8. This parameter can be useful when the image, once uncompressed, would be unacceptably big. (Input parameter) /QUALITAT= (Quality) Quality of compression, in the range [0,100], where [5,95] is the useful range but, in many cases, we use a value between 70 and 75 (by default is 75). Low values means very low quality but high compression. (Input parameter) /NO_METADADES (No metadata) Indicates that we don't want to create a metadata file asociaded with JPEG file based on metadata form IMG files. It's created by default. It doesn't apply when the file to transform is not an IMG. (Input parameter) /FWORLD= (World File) Create a world file extension indicated. (Input parameter) /NFIL_PAQUET= (Preview) Number of rows of each package indexed. It is recommended that greater than 64. (Input parameter) /QUICKLOOK= (Quicklook) Small image that shows how to preview Windows and all programs of image processing since OBrien not read JPEG indexed MiraMon. It may not be indicated in this case Windows and other programs show only the first packet of rows of the image. (Input parameter)

This application supports and generates REL v.4
The routines used to compress and uncompress of JPEG format are partially based on the work of "Independent JPEG Group" (IJPEG).
Idrisi is a program (c) of J.Ronald Eastman and Clark University