Skip to content

Add support for rendering images #919

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Apr 22, 2025
Merged

Add support for rendering images #919

merged 20 commits into from
Apr 22, 2025

Conversation

LaurenzV
Copy link
Contributor

No description provided.

@LaurenzV LaurenzV requested a review from grebmeg April 16, 2025 21:26
@LaurenzV
Copy link
Contributor Author

@DJMcNab Regarding the image assets for the tests I added, is it fine to store them where I did? Would you like to see them stored somewhere else instead?

@@ -13,6 +13,7 @@ publish = false

[dependencies]
peniko = { workspace = true }
png = { workspace = true }
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we actually need this? Could we move the responsibility of preparing the image data to the client? If it still provides value, perhaps we could consider making it an optional feature?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Given that loading png images is such a common operation, I think it would be good to keep this. But I will definitely make it an optional feature.

@LaurenzV LaurenzV force-pushed the images branch 3 times, most recently from fed3369 to c3a3505 Compare April 22, 2025 06:47
Copy link
Member

@DJMcNab DJMcNab left a comment

Choose a reason for hiding this comment

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

The stored in-repo images are fine - they're small, and not stored in LFS, which are the properties we need for test input.

repeat!("image_pad_x_pad_y", Extend::Pad, Extend::Pad);
}

macro_rules! transform {
Copy link
Contributor

Choose a reason for hiding this comment

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

Somehow I missed these macros — honestly, I find things a lot easier to read/debug when it’s just plain functions, unless using macros truly adds value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was planning on removing all the macros in #925, would it be okay if I defer it until then?

Copy link
Contributor

Choose a reason for hiding this comment

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

Absolutely!

@LaurenzV
Copy link
Contributor Author

What... Two tests are only failing on Windows? 😅

@LaurenzV
Copy link
Contributor Author

I will just exclude them for now, no idea what's going on.

@LaurenzV LaurenzV added this pull request to the merge queue Apr 22, 2025
Merged via the queue into main with commit b7f8277 Apr 22, 2025
33 of 34 checks passed
@LaurenzV LaurenzV deleted the images branch April 22, 2025 16:37
@DJMcNab
Copy link
Member

DJMcNab commented Apr 22, 2025

Can you make an issue for the failing tests please?

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.

4 participants