batik:rasterize

Full name:

org.codehaus.mojo:batik-maven-plugin:1.0-beta-1:rasterize

Description:

Rasterize SVGs.

Attributes:

  • Requires a Maven 2.0 project to be executed.
  • Binds by default to the lifecycle phase: generate-resources.

Required Parameters

Name Type Since Description
destDir File - The directory to write the rasterized SVG files.
Default value is: ${project.build.directory}/generated-resources/images.
destType String - The type of file to convert to. Valid values are png, jpeg, tiff or pdf.
Default value is: png.
srcDir File - The directory containing the SVG files.
Default value is: ${basedir}/src/main/svg.
srcIncludes String - The file pattern for inclusion of SVG files.
Default value is: **/*.svg.

Optional Parameters

Name Type Since Description
background String - The background color. Valid values are of the form #rrggbb.
dpi float - The desired resolution, in dots-per-inch (dpi). Use -1 disable setting the dpi.
Default value is: -1.
height float - The output height, or -1 to not constrain the height.
Default value is: -1.
indexed int - The PNG index value. Only used when destination type is png. Valid values are 1, 2, 4 or 8 bits, or -1 to not index.
Default value is: -1.
maxHeight float - The maximum output height, or -1 to not constrain the maximum height.
Default value is: -1.
maxWidth float - The maximum output width, or -1 to not constrain the maximum width.
Default value is: -1.
quality float - The JPEG encoding quality. Only used when destination type is jpeg. Valid values are between 0.0 and 0.99 inclusive, or -1 to disable setting the quality.
Default value is: -1.
srcExcludes String - The file pattern for exclusion of SVG files.
width float - The output width, or -1 to not constrain the width.
Default value is: -1.

Parameter Details

background:

The background color. Valid values are of the form #rrggbb.
  • Type: java.lang.String
  • Required: No

destDir:

The directory to write the rasterized SVG files.
  • Type: java.io.File
  • Required: Yes
  • Default: ${project.build.directory}/generated-resources/images

destType:

The type of file to convert to. Valid values are png, jpeg, tiff or pdf.
  • Type: java.lang.String
  • Required: Yes
  • Default: png

dpi:

The desired resolution, in dots-per-inch (dpi). Use -1 disable setting the dpi.
  • Type: float
  • Required: No
  • Default: -1

height:

The output height, or -1 to not constrain the height.
  • Type: float
  • Required: No
  • Default: -1

indexed:

The PNG index value. Only used when destination type is png. Valid values are 1, 2, 4 or 8 bits, or -1 to not index.
  • Type: int
  • Required: No
  • Default: -1

maxHeight:

The maximum output height, or -1 to not constrain the maximum height.
  • Type: float
  • Required: No
  • Default: -1

maxWidth:

The maximum output width, or -1 to not constrain the maximum width.
  • Type: float
  • Required: No
  • Default: -1

quality:

The JPEG encoding quality. Only used when destination type is jpeg. Valid values are between 0.0 and 0.99 inclusive, or -1 to disable setting the quality.
  • Type: float
  • Required: No
  • Default: -1

srcDir:

The directory containing the SVG files.
  • Type: java.io.File
  • Required: Yes
  • Default: ${basedir}/src/main/svg

srcExcludes:

The file pattern for exclusion of SVG files.
  • Type: java.lang.String
  • Required: No

srcIncludes:

The file pattern for inclusion of SVG files.
  • Type: java.lang.String
  • Required: Yes
  • Default: **/*.svg

width:

The output width, or -1 to not constrain the width.
  • Type: float
  • Required: No
  • Default: -1