-
Notifications
You must be signed in to change notification settings - Fork 52
Expose routines for reading and creating .png files #1553
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,6 +19,12 @@ public ImageSurface(GLib.Bytes data, Format format, int width, int height, int s | |
| SetUserData(data); | ||
| } | ||
|
|
||
| public ImageSurface(string filename) : | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure I like the constructor here as it does not make clear that it is valid for png only. We should at least rename the parameter to On the other hand I like that it's aligned with the rest of the API. There is still issue: #1506 So to come to a conclusion: Let's start with a regular constructor in this PR and other considerations come later. What do you think? |
||
| base(Internal.ImageSurface.CreateFromPng(GLib.Internal.NonNullableUtf8StringOwnedHandle.Create(filename))) | ||
| { | ||
| Handle.AddMemoryPressure(GetSizeInBytes()); | ||
| } | ||
|
|
||
| private void SetUserData(GLib.Bytes data) | ||
| { | ||
| var userDataHandler = new Internal.UserDataHandler(data.Handle); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.