Hi Robert,
You should try adding style="image-rendering:optimizeSpeed" to the image elements (you can put it in the templates probably).  That should disable the anti-aliasing when resizing the barcodes.

Thomas

On Sep 21, 2012, at 11:00 AM, Robert Jenks <rjenks@animefest.org> wrote:

I am currently using Batik as part of a workflow to print badges for a convention.   I have a java desktop application which:
  1. polls a web server for badges to print
  2. retrieves the data (type, template name, person's name, id, etc...)
  3. loads an appropriate SVG template
  4. Uses ZXing to generate a code-128 barcode and an QR code
  5. Loads the appropriate picture for the badge
  6. converts the barcode and picture PNGs into data: urls
  7. find the appropriate elements in the svg dom and replaces the dummy images with the picture and barcode data: urls
  8. sets the batik transcoder output resolution
  9. rasterizes the svg to a png file
  10. sends the png to a photo printer
The problem I am having is that resulting badge png has artifacts in the barcodes.  They're either antialiasing or scaling artifacts.  This makes the barcode a little hard to scan with readers and slowed down our registration system.  Does anyone have any suggestions on how I can keep the barcode images as crisp black and white images inside the full color badge?

Thanks,
Robert