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

Linux: NetVips.VipsException: unable to write to buffer VipsForeignSave: "��G��" is not a known buffer format #9

Closed
BurtonShane opened this issue Jun 24, 2018 · 3 comments
Labels
bug Something isn't working

Comments

@BurtonShane
Copy link

BurtonShane commented Jun 24, 2018

Hi,
I am unable to use Image.WriteToBuffer() in a Linux Docker image.

I'm passing in the extension like shown in the documentation:
imageBytes = img.WriteToBuffer(".png");

This works perfectly fine when running in Windows, but in Linux it throws an exception like "NetVips.VipsException: unable to write to buffer VipsForeignSave: "�� p��" is not a known buffer format".

Tested in both Ubuntu and Alpine Docker images, using the same libvips install/build steps as from here

Image.WriteToFile() works in Linux, but i'd prefer not to have to save things to temp files if i can avoid it

kleisauke added a commit that referenced this issue Jun 28, 2018
The string pointer was freed too early.
@kleisauke kleisauke added the bug Something isn't working label Jun 28, 2018
@kleisauke
Copy link
Owner

Hi Shane,

Thanks for reporting this bug! It's fixed with d96fab4 (it was due to a string pointer which was freed too early).

I've also added a unit test to ensure that this will never happen again. I'll publish a new version (1.0.4) on NuGet today.

@kleisauke
Copy link
Owner

NetVips 1.0.4 is now available on NuGet.

@BurtonShane
Copy link
Author

Thanks for the quick fix! I tested and can confirm its working now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants