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

Add target write to rawsave #3941

Closed
jcupitt opened this issue Apr 18, 2024 Discussed in #3940 · 2 comments · Fixed by #3942
Closed

Add target write to rawsave #3941

jcupitt opened this issue Apr 18, 2024 Discussed in #3940 · 2 comments · Fixed by #3942

Comments

@jcupitt
Copy link
Member

jcupitt commented Apr 18, 2024

Discussed in #3940

Originally posted by akash-akya April 18, 2024
Does it makes sense to create VipsForeignSaveRawTarget to support streaming raw pixels in a unified way (vips_image_write_to_target(in, ".raw", target))?
I know there is already VipsForeignSaveRawFd which can be used to create similar interface, but in our case we have a unified interface to do streaming writes and this would help us to avoid creating special case to write raw pixels.

If this makes sense then I can try implementing it

@jcupitt
Copy link
Member Author

jcupitt commented Apr 18, 2024

From the discussion:

You can copy-paste code from something like ppmsave. I would have an abstract base class VipsForeignSaveRaw which writes to a target, then define VipsForeignSaveRawTarget, VipsForeignSaveRawFile etc. as concrete subclasses which define the parameters.

@akash-akya
Copy link
Contributor

Thanks for the pointers. I'll try have a PR ready over the weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants