Home Compare Image Size in KB in Java
Reply: 0

Compare Image Size in KB in Java

user421
1#
user421 Published in July 19, 2018, 9:40 am

I am using an api which gives me the size of an image, such as 200KB (can be MBs also). Now I need to perform some action on images below a specific size. What I am trying to achieve is something like this:

String imgSize = img.getSize();
if(imgSize < 250KB) {
  // Do Something
}

I can't use the relational operator here. What could be the best way to achieve this?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.6566 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO