Package net.sourceforge.jiu.ops

Examples of net.sourceforge.jiu.ops.OperationFailedException


    hc.setImage(image, RGBIndex.INDEX_RED, RGBIndex.INDEX_GREEN, RGBIndex.INDEX_BLUE);
    hc.process();
    Histogram3D hist = hc.getHistogram();
    if (hist == null)
    {
      throw new OperationFailedException("Could not create histogram from input image.");
    }
    int numUniqueColors = hist.getNumUsedEntries();
    if (numUniqueColors <= paletteSize)
    {
      throw new WrongParameterException("Input image has only " + numUniqueColors +
View Full Code Here


      }
    }
    catch (IOException ioe)
    {
      close();
      throw new OperationFailedException("I/O error occurred: " + ioe.toString());
    }
  }
View Full Code Here

        throw new WrongParameterException("Could find neither objects for loading nor for saving.");
      }
    }
    catch (IOException ioe)
    {
      throw new OperationFailedException("I/O error in RAS codec: " + ioe.toString());
    }
  }
View Full Code Here

    hc.setImage((IntegerImage)getInputImage(), RGBIndex.INDEX_RED, RGBIndex.INDEX_GREEN, RGBIndex.INDEX_BLUE);
    hc.process();
    Histogram3D hist = hc.getHistogram();
    if (hist == null)
    {
      throw new OperationFailedException("Could not create histogram from input image.");
    }
    int numUniqueColors = hist.getNumUsedEntries();
    if (numUniqueColors <= paletteSize)
    {
      paletteSize = numUniqueColors;
View Full Code Here

    hc.setImage((IntegerImage)in, RGBIndex.INDEX_RED, RGBIndex.INDEX_GREEN, RGBIndex.INDEX_BLUE);
    hc.process();
    Histogram3D hist = hc.getHistogram();
    if (hist == null)
    {
      throw new OperationFailedException("Could not create histogram from input image.");
    }
    int numUniqueColors = hist.getNumUsedEntries();
    if (numUniqueColors <= paletteSize)
    {
      paletteSize = numUniqueColors;
View Full Code Here

    {
      load();
    }
    catch (IOException ioe)
    {
      throw new OperationFailedException("I/O error: " + ioe.toString());
    }
  }
View Full Code Here

        throw new InvalidFileStructureException("I/O error while loading: " + ioe.toString());
      }
    }
    else
    {
      throw new OperationFailedException("Only loading from IFF is supported.");
    }
  }
View Full Code Here

        save();
      }
    }
    catch (IOException ioe)
    {
      throw new OperationFailedException("I/O error: " + ioe.toString());
    }
  }
View Full Code Here

        in = new DataInputStream(checkedIn);
        load();
      }
      catch (IOException ioe)
      {
        throw new OperationFailedException("I/O failure: " + ioe.toString());
      }
    }
    else
    if (getMode() == CodecMode.SAVE)
    {
      try
      {
        PixelImage image = getImage();
        if (image == null)
        {
          throw new MissingParameterException("Need image for saving.");
        }
        out = getOutputAsDataOutput();
        if (out == null)
        {
          throw new MissingParameterException("Could not retrieve non-null DataOutput object for saving.");
        }
        setBoundsIfNecessary(image.getWidth(), image.getHeight());
        save();
      }
      catch (IOException ioe)
      {
        throw new OperationFailedException("I/O failure: " + ioe.toString());
      }
    }
    else
    {
      throw new OperationFailedException("Unknown codec mode: " + getMode());
    }
  }
View Full Code Here

    OperationFailedException
  {
    initModeFromIOObjects();
    if (getMode() == CodecMode.LOAD)
    {
      throw new OperationFailedException("Loading is not supported.");
    }
    else
    {
      save();
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.jiu.ops.OperationFailedException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.