Display size of image in KB swift
Solution:
let size = Double(round(100 * image_size) / 100)
let sizeStr = String(describing:size)
messageSizeLbl.text = "Size: "+sizeStr+" kb"
You can use the above code to display the size of an image in kilobytes.
Solution:
let size = Double(round(100 * image_size) / 100)
let sizeStr = String(describing:size)
messageSizeLbl.text = "Size: "+sizeStr+" kb"
You can use the above code to display the size of an image in kilobytes.
Comments
Post a Comment