Tabnine Logo
PNGEncodeParam.setPhysicalDimension
Code IndexAdd Tabnine to your IDE (free)

How to use
setPhysicalDimension
method
in
org.apache.batik.ext.awt.image.codec.png.PNGEncodeParam

Best Java code snippets using org.apache.batik.ext.awt.image.codec.png.PNGEncodeParam.setPhysicalDimension (Showing top 16 results out of 315)

origin: org.apache.xmlgraphics/batik-codec

/**
 * A convenience method that calls the array version.
 */
public void setPhysicalDimension(int xPixelsPerUnit,
                 int yPixelsPerUnit,
                 int unitSpecifier) {
  int[] pd = new int[3];
  pd[0] = xPixelsPerUnit;
  pd[1] = yPixelsPerUnit;
  pd[2] = unitSpecifier;
  setPhysicalDimension(pd);
}
origin: liuyueyi/quick-media

/**
 * A convenience method that calls the array version.
 */
public void setPhysicalDimension(int xPixelsPerUnit,
                 int yPixelsPerUnit,
                 int unitSpecifier) {
  int[] pd = new int[3];
  pd[0] = xPixelsPerUnit;
  pd[1] = yPixelsPerUnit;
  pd[2] = unitSpecifier;
  setPhysicalDimension(pd);
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * A convenience method that calls the array version.
 */
public void setPhysicalDimension(int xPixelsPerUnit,
                 int yPixelsPerUnit,
                 int unitSpecifier) {
  int[] pd = new int[3];
  pd[0] = xPixelsPerUnit;
  pd[1] = yPixelsPerUnit;
  pd[2] = unitSpecifier;
  setPhysicalDimension(pd);
}
origin: apache/batik

/**
 * A convenience method that calls the array version.
 */
public void setPhysicalDimension(int xPixelsPerUnit,
                 int yPixelsPerUnit,
                 int unitSpecifier) {
  int[] pd = new int[3];
  pd[0] = xPixelsPerUnit;
  pd[1] = yPixelsPerUnit;
  pd[2] = unitSpecifier;
  setPhysicalDimension(pd);
}
origin: liuyueyi/quick-media

private void parse_pHYs_chunk(PNGChunk chunk) {
  int xPixelsPerUnit = chunk.getInt4(0);
  int yPixelsPerUnit = chunk.getInt4(4);
  int unitSpecifier = chunk.getInt1(8);
  if (encodeParam != null) {
    encodeParam.setPhysicalDimension(xPixelsPerUnit,
                     yPixelsPerUnit,
                     unitSpecifier);
  }
  if (emitProperties) {
    properties.put("x_pixels_per_unit", new Integer(xPixelsPerUnit));
    properties.put("y_pixels_per_unit", new Integer(yPixelsPerUnit));
    properties.put("pixel_aspect_ratio",
            new Float((float)xPixelsPerUnit/yPixelsPerUnit));
    if (unitSpecifier == 1) {
      properties.put("pixel_units", "Meters");
    } else if (unitSpecifier != 0) {
      // Error -- unit specifier must be 0 or 1
      String msg = PropertyUtil.getString("PNGImageDecoder12");
      throw new RuntimeException(msg);
    }
  }
}
origin: liuyueyi/quick-media

private void parse_pHYs_chunk(PNGChunk chunk) {
  int xPixelsPerUnit = chunk.getInt4(0);
  int yPixelsPerUnit = chunk.getInt4(4);
  int unitSpecifier = chunk.getInt1(8);
  if (encodeParam != null) {
    encodeParam.setPhysicalDimension(xPixelsPerUnit,
                     yPixelsPerUnit,
                     unitSpecifier);
  }
  if (emitProperties) {
    properties.put("x_pixels_per_unit", new Integer(xPixelsPerUnit));
    properties.put("y_pixels_per_unit", new Integer(yPixelsPerUnit));
    properties.put("pixel_aspect_ratio",
            new Float((float)xPixelsPerUnit/yPixelsPerUnit));
    if (unitSpecifier == 1) {
      properties.put("pixel_units", "Meters");
    } else if (unitSpecifier != 0) {
      // Error -- unit specifier must be 0 or 1
      String msg = PropertyUtil.getString("PNGImageDecoder12");
      throw new RuntimeException(msg);
    }
  }
}
origin: fr.avianey.apache-xmlgraphics/batik

private void parse_pHYs_chunk(PNGChunk chunk) {
  int xPixelsPerUnit = chunk.getInt4(0);
  int yPixelsPerUnit = chunk.getInt4(4);
  int unitSpecifier = chunk.getInt1(8);
  if (encodeParam != null) {
    encodeParam.setPhysicalDimension(xPixelsPerUnit,
                     yPixelsPerUnit,
                     unitSpecifier);
  }
  if (emitProperties) {
    properties.put("x_pixels_per_unit", new Integer(xPixelsPerUnit));
    properties.put("y_pixels_per_unit", new Integer(yPixelsPerUnit));
    properties.put("pixel_aspect_ratio",
            new Float((float)xPixelsPerUnit/yPixelsPerUnit));
    if (unitSpecifier == 1) {
      properties.put("pixel_units", "Meters");
    } else if (unitSpecifier != 0) {
      // Error -- unit specifier must be 0 or 1
      String msg = PropertyUtil.getString("PNGImageDecoder12");
      throw new RuntimeException(msg);
    }
  }
}
origin: fr.avianey.apache-xmlgraphics/batik

private void parse_pHYs_chunk(PNGChunk chunk) {
  int xPixelsPerUnit = chunk.getInt4(0);
  int yPixelsPerUnit = chunk.getInt4(4);
  int unitSpecifier = chunk.getInt1(8);
  if (encodeParam != null) {
    encodeParam.setPhysicalDimension(xPixelsPerUnit,
                     yPixelsPerUnit,
                     unitSpecifier);
  }
  if (emitProperties) {
    properties.put("x_pixels_per_unit", new Integer(xPixelsPerUnit));
    properties.put("y_pixels_per_unit", new Integer(yPixelsPerUnit));
    properties.put("pixel_aspect_ratio",
            new Float((float)xPixelsPerUnit/yPixelsPerUnit));
    if (unitSpecifier == 1) {
      properties.put("pixel_units", "Meters");
    } else if (unitSpecifier != 0) {
      // Error -- unit specifier must be 0 or 1
      String msg = PropertyUtil.getString("PNGImageDecoder12");
      throw new RuntimeException(msg);
    }
  }
}
origin: apache/batik

private void parse_pHYs_chunk(PNGChunk chunk) {
  int xPixelsPerUnit = chunk.getInt4(0);
  int yPixelsPerUnit = chunk.getInt4(4);
  int unitSpecifier = chunk.getInt1(8);
  if (encodeParam != null) {
    encodeParam.setPhysicalDimension(xPixelsPerUnit,
                     yPixelsPerUnit,
                     unitSpecifier);
  }
  if (emitProperties) {
    properties.put("x_pixels_per_unit", xPixelsPerUnit);
    properties.put("y_pixels_per_unit", yPixelsPerUnit);
    properties.put("pixel_aspect_ratio",
        (float) xPixelsPerUnit / yPixelsPerUnit);
    if (unitSpecifier == 1) {
      properties.put("pixel_units", "Meters");
    } else if (unitSpecifier != 0) {
      // Error -- unit specifier must be 0 or 1
      String msg = PropertyUtil.getString("PNGImageDecoder12");
      throw new RuntimeException(msg);
    }
  }
}
origin: apache/batik

private void parse_pHYs_chunk(PNGChunk chunk) {
  int xPixelsPerUnit = chunk.getInt4(0);
  int yPixelsPerUnit = chunk.getInt4(4);
  int unitSpecifier = chunk.getInt1(8);
  if (encodeParam != null) {
    encodeParam.setPhysicalDimension(xPixelsPerUnit,
                     yPixelsPerUnit,
                     unitSpecifier);
  }
  if (emitProperties) {
    properties.put("x_pixels_per_unit", xPixelsPerUnit);
    properties.put("y_pixels_per_unit", yPixelsPerUnit);
    properties.put("pixel_aspect_ratio",
        (float) xPixelsPerUnit / yPixelsPerUnit);
    if (unitSpecifier == 1) {
      properties.put("pixel_units", "Meters");
    } else if (unitSpecifier != 0) {
      // Error -- unit specifier must be 0 or 1
      String msg = PropertyUtil.getString("PNGImageDecoder12");
      throw new RuntimeException(msg);
    }
  }
}
origin: org.apache.xmlgraphics/batik-codec

private void parse_pHYs_chunk(PNGChunk chunk) {
  int xPixelsPerUnit = chunk.getInt4(0);
  int yPixelsPerUnit = chunk.getInt4(4);
  int unitSpecifier = chunk.getInt1(8);
  if (encodeParam != null) {
    encodeParam.setPhysicalDimension(xPixelsPerUnit,
                     yPixelsPerUnit,
                     unitSpecifier);
  }
  if (emitProperties) {
    properties.put("x_pixels_per_unit", xPixelsPerUnit);
    properties.put("y_pixels_per_unit", yPixelsPerUnit);
    properties.put("pixel_aspect_ratio",
        (float) xPixelsPerUnit / yPixelsPerUnit);
    if (unitSpecifier == 1) {
      properties.put("pixel_units", "Meters");
    } else if (unitSpecifier != 0) {
      // Error -- unit specifier must be 0 or 1
      String msg = PropertyUtil.getString("PNGImageDecoder12");
      throw new RuntimeException(msg);
    }
  }
}
origin: org.apache.xmlgraphics/batik-codec

private void parse_pHYs_chunk(PNGChunk chunk) {
  int xPixelsPerUnit = chunk.getInt4(0);
  int yPixelsPerUnit = chunk.getInt4(4);
  int unitSpecifier = chunk.getInt1(8);
  if (encodeParam != null) {
    encodeParam.setPhysicalDimension(xPixelsPerUnit,
                     yPixelsPerUnit,
                     unitSpecifier);
  }
  if (emitProperties) {
    properties.put("x_pixels_per_unit", xPixelsPerUnit);
    properties.put("y_pixels_per_unit", yPixelsPerUnit);
    properties.put("pixel_aspect_ratio",
        (float) xPixelsPerUnit / yPixelsPerUnit);
    if (unitSpecifier == 1) {
      properties.put("pixel_units", "Meters");
    } else if (unitSpecifier != 0) {
      // Error -- unit specifier must be 0 or 1
      String msg = PropertyUtil.getString("PNGImageDecoder12");
      throw new RuntimeException(msg);
    }
  }
}
origin: liuyueyi/quick-media

params.setPhysicalDimension(numPix, numPix, 1); // 1 means 'pix/meter'
origin: fr.avianey.apache-xmlgraphics/batik

params.setPhysicalDimension(numPix, numPix, 1); // 1 means 'pix/meter'
origin: org.apache.xmlgraphics/batik-codec

params.setPhysicalDimension(numPix, numPix, 1); // 1 means 'pix/meter'
origin: apache/batik

params.setPhysicalDimension(numPix, numPix, 1); // 1 means 'pix/meter'
org.apache.batik.ext.awt.image.codec.pngPNGEncodeParamsetPhysicalDimension

Javadoc

A convenience method that calls the array version.

Popular methods of PNGEncodeParam

  • abs
    An abs() function for use by the Paeth predictor.
  • addPrivateChunk
    Adds a private chunk, in binary form, to the list of chunks to be stored with this image.
  • filterRow
    Performs filtering on a row of an image. This method may be overridden in order to provide a custom
  • getChromaticity
    Returns the white point and primary chromaticities in CIE (x, y) space. See the documentation for th
  • getCompressedText
    Returns the text strings to be stored in compressed form with this image as an array of Strings. If
  • getDefaultEncodeParam
    Returns an instance of PNGEncodeParam.Palette,PNGEncodeParam.Gray, or PNGEncodeParam.RGB appropriate
  • getGamma
    Returns the file gamma value for the image. If the file gamma has not previously been set, or has be
  • getICCProfileData
    Returns the ICC profile data to be stored with this image. If the ICC profile has not previously bee
  • getInterlacing
    Returns true if Adam7 interlacing will be used.
  • getModificationTime
    Returns the modification time to be stored with this image. If the bit depth has not previously been
  • getNumPrivateChunks
    Returns the number of private chunks to be written to the output file.
  • getPaletteHistogram
    Returns the palette histogram to be stored with this image. If the histogram has not previously been
  • getNumPrivateChunks,
  • getPaletteHistogram,
  • getPhysicalDimension,
  • getPrivateChunkData,
  • getPrivateChunkType,
  • getSRGBIntent,
  • getSignificantBits,
  • getText,
  • isBackgroundSet,
  • isChromaticitySet

Popular in Java

  • Finding current android device location
  • getApplicationContext (Context)
  • getSystemService (Context)
  • setContentView (Activity)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • JFileChooser (javax.swing)
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now