Shared Samples

Try out source code samples stored in Bitbucket repositories.
Showing results for 
Search instead for 
Do you mean 

Job writemdf: how to convert .img to non-img format

by Technical Evangelist on ‎09-08-2015 10:45 AM - edited on ‎03-29-2016 11:35 AM by Anonymous (781 Views)

Example Type

Job

           

 

Purpose

 

This example shows how to write a program that convert img to mdf(non-img raster file). The mdf file(my data format) is not related to any known "standard" format.

 

Files

 

writemdf.c                   (C source code)

writemdf.eml   (EML script)

writemdf.dsp   (Visual C++ Project)(Windows Only)

 

 

Description

 

The source code in this file provides the required Functions for an executable that writes a BSQ image file containing 12 header bytes. And binary pixel data to an IMG file. The header bytes represent 3 values; the number of image bands the number of rows, and the number of columns.

 

 

Command Line Options

 

writemdf -in <inputfile> -out <outputfile> -m <1 or 0> -h <1 or 0>

 

 -in[put]

 The input .img file name.

 

-out[put]

 The output .mdf file name.

 

-m[eter]

 with meter bar.

 

-h[eader]

 generate header file (include pixel depth, Pixel Coordinate...)

 

 

Interface

 demo.jpg

 

 

Output

The output are mdf image and mdh header file (optional)

 

Source Code

https://bitbucket.org/HGDN/hgdn_erdas_imagine/src/e1ade3b7d148b0f2f1aa6427044dfa4bce6226ee/Job_write...

  

 

 

Overview
Contributors