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

TargetSize doesn't work #22

Open
paipeng opened this issue Dec 12, 2021 · 0 comments
Open

TargetSize doesn't work #22

paipeng opened this issue Dec 12, 2021 · 0 comments

Comments

@paipeng
Copy link

paipeng commented Dec 12, 2021

by using the following code,

ImageWriter writer = ImageIO.getImageWritersByMIMEType("image/webp").next();

// Configure encoding parameters
WebPWriteParam writeParam = new WebPWriteParam(writer.getLocale());
writeParam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
writeParam.setCompressionType(writeParam.getCompressionTypes()[WebPWriteParam.LOSSY_COMPRESSION]);
writeParam.setTargetSize(40000);

The output webp file doesn't be changed, by adjusting setTargetSize values.

@paipeng paipeng changed the title TargetSize doesn TargetSize doesn't work Dec 12, 2021
joostoudeman pushed a commit to joostoudeman/webp-imageio that referenced this issue Jun 16, 2023
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

No branches or pull requests

1 participant