Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified assets/readme/examples/feature-catalog.pdf
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* <li><b>Footer brand stripe</b> — accent rule + brand links.</li>
* </ul>
*
* <p>The hero image lives in {@code examples/src/main/resources/engine-hero.png}
* <p>The hero image lives in {@code examples/src/main/resources/engine-hero.jpg}
* and is loaded over the classpath so the example runs without any
* filesystem path assumptions.</p>
*
Expand Down Expand Up @@ -201,8 +201,8 @@ public static Path generate() throws Exception {

private static DocumentImageData loadHeroImage() throws Exception {
try (InputStream is = Objects.requireNonNull(
EngineShowcase.class.getResourceAsStream("/engine-hero.png"),
"engine-hero.png missing from examples/src/main/resources/")) {
EngineShowcase.class.getResourceAsStream("/engine-hero.jpg"),
"engine-hero.jpg missing from examples/src/main/resources/")) {
return DocumentImageData.fromBytes(is.readAllBytes());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public static Path generate() throws Exception {

feature(flow, "Images — classpath bytes, explicit size, fit modes", """
DocumentImageData photo = DocumentImageData.fromBytes(
getClass().getResourceAsStream("/engine-hero.png").readAllBytes());
getClass().getResourceAsStream("/engine-hero.jpg").readAllBytes());
section.addImage(i -> i.source(photo).size(150, 84)
.fitMode(DocumentImageFitMode.COVER)) // vs CONTAIN on the right""",
demo -> demo.addRow(r -> r.spacing(14).weights(1, 1)
Expand Down Expand Up @@ -477,8 +477,8 @@ private static void feature(com.demcha.compose.document.dsl.PageFlowBuilder flow
/** Classpath demo photo shared by the image fit-mode pair. */
private static com.demcha.compose.document.image.DocumentImageData catalogImage() {
try (java.io.InputStream stream = java.util.Objects.requireNonNull(
FeatureCatalogExample.class.getResourceAsStream("/engine-hero.png"),
"engine-hero.png missing from examples/src/main/resources/")) {
FeatureCatalogExample.class.getResourceAsStream("/engine-hero.jpg"),
"engine-hero.jpg missing from examples/src/main/resources/")) {
return com.demcha.compose.document.image.DocumentImageData.fromBytes(
stream.readAllBytes());
} catch (java.io.IOException e) {
Expand Down
Binary file added examples/src/main/resources/engine-hero.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed examples/src/main/resources/engine-hero.png
Binary file not shown.