Skip to content

[Fixes #48] Reinstate png, jpg support. Removes imagen-legacy dependency.#83

Merged
aaime merged 1 commit into
mapfish:mainfrom
etj:48_main_pngjpg
Jun 17, 2026
Merged

[Fixes #48] Reinstate png, jpg support. Removes imagen-legacy dependency.#83
aaime merged 1 commit into
mapfish:mainfrom
etj:48_main_pngjpg

Conversation

@etj

@etj etj commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings June 16, 2026 10:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR migrates image mosaic generation away from the legacy Imagen codec APIs by switching TIFF/image reading to the newer ImageRead operation and ParameterBlockImageN, and removes the legacy codec dependency from the build.

Changes:

  • Replace legacy FileSeekableStream + ParameterBlock usage with ParameterBlockImageN and the ImageRead operation.
  • Add debug logging guard and minor readability tweaks in width calculation.
  • Remove imagen-legacy-codec-core from pom.xml.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/main/java/org/mapfish/print/output/FileCachingJaiMosaicOutputFactory.java Updates image read/translate/mosaic construction to use ParameterBlockImageN + ImageRead instead of legacy codec classes.
pom.xml Drops the legacy codec dependency now that it’s no longer used by the mosaic pipeline.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +113 to +115
ParameterBlockImageN pb = new ParameterBlockImageN("ImageRead");
pb.setParameter("Input", imageinfo.imageFile);
RenderedOp source = ImageN.create("ImageRead", pb);
Comment on lines +118 to +120
if(LOGGER.isDebugEnabled()) {
LOGGER.debug("Adding page image " + i + " bounds: [" + 0 + "," + height + " " + source.getWidth() + "," + (height + source.getHeight()) + "]");
}
Comment on lines +137 to +142
ParameterBlockImageN pbTranslate = new ParameterBlockImageN("translate");
pbTranslate.addSource(source);
pbTranslate.setParameter("xTrans", 0f);
pbTranslate.setParameter("yTrans", height);
return ImageN.create("translate", pbTranslate);
}
@etj etj force-pushed the 48_main_pngjpg branch from d46eabb to 1a3d9e7 Compare June 16, 2026 11:15
@aaime aaime merged commit 533fb79 into mapfish:main Jun 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants