Skip to content
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

Rework rawsave and add rawsave_target #3942

Merged
merged 6 commits into from Apr 27, 2024

Conversation

akash-akya
Copy link
Contributor

Fixes #3941

@akash-akya
Copy link
Contributor Author

@jcupitt need your help to review the changes.

I kept vips_rawsave_fd function but removed rawsave_fd operation in favor of rawsave_target. I am not sure if this breaks something in the downstream. Do we have to retain the operation?

How to regenerate doc/function-list.xml file?

@jcupitt
Copy link
Member

jcupitt commented Apr 21, 2024

It's probably OK to remove rawsave_fd, I doubt if anyone was using it. We'll need to keep the C API point vips_rawsave_fd() to avoid link failures, but we can tag it as deprecated.

You need gen-function-list.py in the doc/ directory.

I'll do a very quick review for you.

Copy link
Member

@jcupitt jcupitt left a comment

Choose a reason for hiding this comment

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

Looks fine, other than one small thing. Nice!

libvips/foreign/rawsave.c Show resolved Hide resolved
libvips/foreign/rawsave.c Show resolved Hide resolved
@jcupitt
Copy link
Member

jcupitt commented Apr 21, 2024

We could maybe add a _buffer subclass too, for completeness.

@akash-akya
Copy link
Contributor Author

akash-akya commented Apr 21, 2024

Facing an issue with generating the docs. I am not able to install pyvips due to compilation issue. I think my local env is messed up because of multiple vips I have installed

 build/temp.macosx-14.3-x86_64-cpython-312/_libvips.c:6208:27: error: incompatible function pointer types passing 'void (*)(void *)' to parameter of type 'VipsCallbackFn' (aka 'int (*)(void *, void *)') [-Wincompatible-function-pointer-types]
        vips_value_set_blob(x0, x1, x2, x3);

Added vips_rawsave_buffer. So vips_rawsave_buffer is very similar to vips_image_write_to_memory but only added for completeness sake correct?

@akash-akya akash-akya marked this pull request as ready for review April 21, 2024 19:21
@akash-akya
Copy link
Contributor Author

Hi @jcupitt, can you take a look at this? Thanks

@jcupitt
Copy link
Member

jcupitt commented Apr 27, 2024

Sorry, I was distracted on other projects, I'll reread this now.

@jcupitt jcupitt merged commit 067b9f5 into libvips:master Apr 27, 2024
6 checks passed
@jcupitt
Copy link
Member

jcupitt commented Apr 27, 2024

It looks great! Thank you for doing this work, @akash-akya!

@akash-akya akash-akya deleted the add-raw-target branch April 27, 2024 18:31
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.

Add target write to rawsave
2 participants