Changeset 3258


Ignore:
Timestamp:
10/11/07 08:27:06 (12 years ago)
Author:
melissa
Message:

Removed option to force compatible pixel type.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/plugins/Exporter.java

    r3256 r3258  
    100100      firstImage = ImageTools.makeBuffered(firstImage, proc.getColorModel()); 
    101101      int thisType = ImageTools.getPixelType((BufferedImage) firstImage); 
    102       boolean forceType = false; 
    103102 
    104103      boolean notSupportedType = !w.isSupportedType(thisType); 
    105       if ((codecs != null && codecs.length > 1) || notSupportedType) { 
     104      if (notSupportedType) { 
     105        IJ.error("Pixel type (" + FormatTools.getPixelTypeString(thisType) + 
     106          ") not supported by this format."); 
     107      } 
     108 
     109      if (codecs != null && codecs.length > 1) { 
    106110        GenericDialog gd = 
    107111          new GenericDialog("LOCI Bio-Formats Exporter Options"); 
     
    109113          gd.addChoice("Compression type: ", codecs, codecs[0]); 
    110114        } 
    111         if (notSupportedType) { 
    112           gd.addCheckbox("Force compatible pixel type", true); 
    113         } 
    114115        gd.showDialog(); 
    115116        if (gd.wasCanceled()) return; 
    116117 
    117118        if (codecs != null) w.setCompression(gd.getNextChoice()); 
    118         if (notSupportedType) forceType = gd.getNextBoolean(); 
    119119      } 
    120120 
     
    157157        } 
    158158 
    159         if (forceType) { 
    160           if (notSupportedType) { 
    161             int[] types = w.getPixelTypes(); 
    162             // TODO - come up with another way to do this... 
    163             //img = ImageTools.makeType(img, types[types.length - 1]); 
    164           } 
    165           w.saveImage(img, i == end - 1); 
     159        if (notSupportedType) { 
     160          IJ.error("Pixel type not supported by this format."); 
    166161        } 
    167162        else w.saveImage(img, i == end - 1); 
Note: See TracChangeset for help on using the changeset viewer.