Examples of PixelImage


Examples of net.sourceforge.jiu.data.PixelImage

         )
       )
    {
      throw new WrongParameterException("Unsupported input image type: " + in.getClass().getName());
    }
    PixelImage out = getOutputImage();
    if (out == null)
    {
      setOutputImage(new MemoryRGB24Image(in.getWidth(), in.getHeight()));
    }
    else
    {
      if (!(out instanceof RGB24Image))
      {
        throw new WrongParameterException("Specified output image type must be of class RGB24Image; got " + in.getClass().getName());
      }
      if (in.getWidth() != out.getWidth())
      {
        throw new WrongParameterException("Specified output image must have same width as input image.");
      }
      if (in.getHeight() != out.getHeight())
      {
        throw new WrongParameterException("Specified output image must have same height as input image.");
      }
    }
  }
View Full Code Here

Examples of net.sourceforge.jiu.data.PixelImage

  public void process() throws
    MissingParameterException,
    WrongParameterException
  {
    PixelImage in = getInputImage();
    prepare(in);
    RGB24Image out = (RGB24Image)getOutputImage();
    if (in instanceof BilevelImage)
    {
      process((BilevelImage)in, out);
View Full Code Here

Examples of net.sourceforge.jiu.data.PixelImage

    setBoundsIfNecessary(ifd.getWidth(), ifd.getHeight());
    checkImageResolution();
    int width = getBoundsWidth();
    int height = getBoundsHeight();
    // create image if necessary
    PixelImage image = getImage();
    if (image == null)
    {
      int imageType = ifd.getImageType();
      switch (imageType)
      {
View Full Code Here

Examples of net.sourceforge.jiu.data.PixelImage

   * If the two differ, a {@link net.sourceforge.jiu.ops.WrongParameterException} is thrown.
   * @throws WrongParameterException if image resolution and bounds dimension differ
   */
  public void checkImageResolution() throws WrongParameterException
  {
    PixelImage image = getImage();
    if (image != null)
    {
      if (image.getWidth() != getBoundsWidth())
      {
        throw new WrongParameterException("Specified input image must have width equal to getBoundsWidth().");
      }
      if (image.getHeight() != getBoundsHeight())
      {
        throw new WrongParameterException("Specified input image must have height equal to getBoundsHeight().");
      }
    }
  }
View Full Code Here

Examples of net.sourceforge.jiu.data.PixelImage

  private void save() throws
    IOException,
    UnsupportedTypeException,
    WrongParameterException
  {
    PixelImage image = getImage();
    if (image == null || (!(image instanceof Paletted8Image)))
    {
      throw new UnsupportedTypeException("Must have non-null image that is a Paletted8Image.");
    }
    saveHeader(image);
View Full Code Here

Examples of net.sourceforge.jiu.data.PixelImage

   *  should be enabled)
   */
  public boolean isAvailable(int menuIndex)
  {
    boolean hasImage = state.hasImage();
    PixelImage image = state.getImage();
    boolean bilevel = hasImage && image instanceof BilevelImage;
    boolean gray8 = hasImage && image instanceof Gray8Image;
    boolean gray16 = hasImage && image instanceof Gray16Image;
    //boolean gray = gray8 || gray16;
    boolean pal8 = hasImage && image instanceof Paletted8Image;
View Full Code Here

Examples of net.sourceforge.jiu.data.PixelImage

    OperationFailedException,
    WrongParameterException
  {
    ensureInputImageIsAvailable();
    ensureImagesHaveSameResolution();
    PixelImage in = getInputImage();
    if (!(in instanceof RGB24Image))
    {
      throw new WrongParameterException("Input image must implement RGB24Image.");
    }
    Histogram3DCreator hc = new Histogram3DCreator();
View Full Code Here

Examples of net.sourceforge.jiu.data.PixelImage

   */
  public void init() throws
    MissingParameterException,
    WrongParameterException
  {
    PixelImage pi = getInputImage();
    if (pi == null)
    {
      throw new MissingParameterException("Input image needed.");
    }
    if (!(pi instanceof RGB24Image))
View Full Code Here

Examples of net.sourceforge.jiu.data.PixelImage

    InvalidImageIndexException,
    UnsupportedTypeException
  {
    for (int i = 0; i < getNumCodecs(); i++)
    {
      PixelImage result = null;
      ImageCodec codec = null;
      try
      {
        codec = createCodec(i);
        codec.setFile(file, CodecMode.LOAD);
View Full Code Here

Examples of net.sourceforge.jiu.data.PixelImage

      }
      catch (InterruptedException ie)
      {
        return null;
      }
      PixelImage image = ImageCreator.convertImageToRGB24Image(awtImage);
      return image;
    }
    catch (Exception e)
    {
      e.printStackTrace();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.