Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
IanH  
#1 Posted : Friday, April 17, 2020 12:30:34 AM(UTC)
IanH

Rank: Newbie

Groups: Member
Joined: 4/17/2020(UTC)
Posts: 2

Is there any support for resizing an image until a target file size is achieved?
For example, if you have a PNG with width and height of 1000px that is 1.5MB and want to reduce the width and height until the file size is around 1MB.

Thanks
Fedor  
#2 Posted : Saturday, April 18, 2020 8:14:10 AM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
There is no a ready method to target a file size however this sample should give you an idea how to implement it:

https://github.com/aurig...martImageOptimization.cs
Best regards,
Fedor Skvortsov
IanH  
#3 Posted : Sunday, April 19, 2020 11:34:51 PM(UTC)
IanH

Rank: Newbie

Groups: Member
Joined: 4/17/2020(UTC)
Posts: 2

Okay great, many thanks for your help.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.