WAI
Status Update
Comments
su...@google.com <su...@google.com>
ji...@google.com <ji...@google.com> #2
Forgot to add a sample code! Here it goes:
SelectionContainer {
LazyColumn {
items(100) {
Text("Line number $it")
}
}
}
A normal column works without any issues (expected since everything is composed unlike the LazyColumn).
Edit to give more details about my use case: I'm trying to show the lines of a text document in my app, so using a column is not an option as the files can be quite large.
ki...@gmail.com <ki...@gmail.com> #3
Sean, would you be able to take the first stab at it and see what's needed?
to...@gmail.com <to...@gmail.com> #4
This happens because the nodes containing selection are removed from the composition when they're scrolled out of view, which causes the selection container to stop tracking them. This is one of the use cases for
Description
But when I try to convert from JPEG -> HEIC format, then loading the EXIF data from JPEG and rewrite on HEIC files. It throws exception
if (!mIsSupportedFile || mMimeType != IMAGE_TYPE_JPEG) {
throw new IOException("ExifInterface only supports saving attributes on JPEG formats.");
}
Example as below:
1. Convert from JPG -> HEIC format
try {
HeifWriter.Builder(destination, imageWidth, imageHeight, HeifWriter.INPUT_MODE_BITMAP)
.setQuality(90)
.build().run {
start()
addBitmap(bitmap)
stop(0)
close()
}
} catch (ex: Exception) {
ex.printStackTrace()
}
2. Load Exif data from original image (JPG), then rewrite onto HEIC destination
val originalExif = ExifInterface(FileInputStream(queueTask.originalFilePath))
val destinationExif = ExifInterface(FileInputStream(destination))
with(destinationExif) {
// Primary image IFD TIFF tags (See JEITA CP-3451C Section 4.6.8 Tag Support Levels)
setAttribute(
ExifInterface.TAG_NEW_SUBFILE_TYPE,
originalExif.getAttribute(ExifInterface.TAG_NEW_SUBFILE_TYPE)
)
setAttribute(
ExifInterface.TAG_SUBFILE_TYPE,
originalExif.getAttribute(ExifInterface.TAG_SUBFILE_TYPE)
)
setAttribute(
ExifInterface.TAG_IMAGE_WIDTH,
originalExif.getAttribute(ExifInterface.TAG_IMAGE_WIDTH)
)
// Saving data
saveAttributes()
}
The Exception is thrown, but I checked on the document then the release note is telling me that the ExifInterface is supported HEIF format from 1.1.0 version
Version
implementation 'androidx.exifinterface:exifinterface:1.1.0-rc01'
I want to addExifData when convert jpg to heic, it need the byte array data of TIFF Header.
If any concerns, please let me know.
Regards.