We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am using this library to compress and update image resolution. But somehow, the Image doesn't convert to the requested resolution of 1500 x 1500.
private suspend fun compressImageMedia(image: Image): Either<Exception, Image> { return try { val sourceFile = File(image.url) val destinationFile = File(context.filesDir, sourceFile.name) val compressedImageFile = Compressor.compress(context, sourceFile) { resolution(1500, 1500) destination(destinationFile) quality(Constant.projectPhotosQuality) format(sourceFile.compressFormat()) } Image(image.index, compressedImageFile.absolutePath).right() } catch (e: Exception) { Timber.e(e, "Image compression failed") e.left() } }
The actual image resolution is 3000 X 4000. The output image resolution is 1500 X 2000 instead of 1125 X 1500.
Library version: 3.0.1
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am using this library to compress and update image resolution. But somehow, the Image doesn't convert to the requested resolution of 1500 x 1500.
Code:
The actual image resolution is 3000 X 4000.
The output image resolution is 1500 X 2000 instead of 1125 X 1500.
Library version: 3.0.1
The text was updated successfully, but these errors were encountered: