Commit 52182e53 authored by Marjorie Hahn's avatar Marjorie Hahn
Browse files

Added auto extension to isis2std and modified documentation so that the user...

Added auto extension to isis2std and modified documentation so that the user knows that world files will be generated if the cube has mapping labels. Fixes #970

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@6899 41f8697f-d340-4b68-9986-7bafba869bb8
parent 386a1661
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -305,6 +305,12 @@
          This parameter is used to select the output format.  It can be one of
          PNG, BMP, JPEG, TIF, GIF, or JP2.  Note that not all formats may be
          available.  It will depend on your installation of the Qt libraries.
          <p>
          In addition, if the cube has Mapping labels, the program will produce 
          a world file for use in Arc and/or other GIS packages. The file will 
          have an extension that uses the first and last letters for the image 
          extention and a "w". For example, .tif produces a world file extension of .tfw.
          </p>
        </description>

        <list>
@@ -679,6 +685,7 @@
      </parameter>
    </group>
  </groups>
  
  <examples>
    <example>
      <brief>
+16 −0
Original line number Diff line number Diff line
# Test BMP images
# Test 1: Test that isis2std adds the appropriate extension based 
#         on the given format to the output file.
APPNAME = isis2std

include $(ISISROOT)/make/isismake.tsts

commands:
	$(APPNAME) from=$(INPUT)/isisTruth.cub+1 \
	  to=$(OUTPUT)/isis2stdTruth_gray \
	  mode=grayscale \
	  format=bmp \
	  stretch=linear > /dev/null;
	std2isis FROM=$(OUTPUT)/isis2stdTruth_gray.bmp \
	  TO=$(OUTPUT)/isis2stdTruth_gray.cub >/dev/null;
	$(RM) $(OUTPUT)/isis2stdTruth_gray.bmp;
+2 −1
Original line number Diff line number Diff line
@@ -99,6 +99,7 @@ namespace Isis {
    p.ProcessCubes(*this);
    
    outputName = outputName.addExtension(m_extension);
    
    createWorldFile(outputName);
  }

+3 −0
Original line number Diff line number Diff line
@@ -57,6 +57,9 @@ namespace Isis {
   */
  void JP2Exporter::write(FileName outputName, int quality,
                          QString compression) {
    
    outputName = outputName.addExtension(extension());
    
    PixelType type = pixelType();
    m_encoder = new JP2Encoder(
        outputName.expanded(), samples(), lines(), bands(), type);
+2 −0
Original line number Diff line number Diff line
@@ -194,6 +194,8 @@ namespace Isis {
                         QString compression) {
    ImageExporter::write(outputName, quality);
    
    outputName = outputName.addExtension(extension());

    // The return status is wrong for JPEG images, so the code will always
    // continue
    if (!m_qimage->save(outputName.expanded(), m_format.toAscii().data(),
Loading