fixed tiff decoder native log

This commit is contained in:
Thibault Deckers 2023-06-23 19:37:18 +02:00
parent 56589fd8d3
commit d79c92a9a0
6 changed files with 13 additions and 252 deletions

View file

@ -224,7 +224,7 @@ dependencies {
// - https://jitpack.io/p/deckerst/Android-TiffBitmapFactory // - https://jitpack.io/p/deckerst/Android-TiffBitmapFactory
// - https://jitpack.io/p/deckerst/mp4parser // - https://jitpack.io/p/deckerst/mp4parser
// - https://jitpack.io/p/deckerst/pixymeta-android // - https://jitpack.io/p/deckerst/pixymeta-android
implementation 'com.github.deckerst:Android-TiffBitmapFactory:876e53870a' implementation 'com.github.deckerst:Android-TiffBitmapFactory:90c06eebf4'
implementation 'com.github.deckerst.mp4parser:isoparser:4cc0c5d06c' implementation 'com.github.deckerst.mp4parser:isoparser:4cc0c5d06c'
implementation 'com.github.deckerst.mp4parser:muxer:4cc0c5d06c' implementation 'com.github.deckerst.mp4parser:muxer:4cc0c5d06c'
implementation 'com.github.deckerst:pixymeta-android:706bd73d6e' implementation 'com.github.deckerst:pixymeta-android:706bd73d6e'

View file

@ -80,11 +80,15 @@ internal class TiffFetcher(val model: TiffImage, val width: Int, val height: Int
inDirectoryNumber = page inDirectoryNumber = page
inSampleSize = sampleSize inSampleSize = sampleSize
} }
val bitmap = TiffBitmapFactory.decodeFileDescriptor(fd, options) try {
if (bitmap == null) { val bitmap = TiffBitmapFactory.decodeFileDescriptor(fd, options)
callback.onLoadFailed(Exception("null bitmap")) if (bitmap == null) {
} else { callback.onLoadFailed(Exception("Decoding full TIFF yielded null bitmap"))
callback.onDataReady(bitmap) } else {
callback.onDataReady(bitmap)
}
} catch (e: Exception) {
callback.onLoadFailed(e)
} }
} }

View file

@ -49,6 +49,7 @@ class Contributors {
Contributor('Макар Разин', 'makarrazin14@gmail.com'), Contributor('Макар Разин', 'makarrazin14@gmail.com'),
Contributor('Leon', 'leonhoog@outlook.com'), Contributor('Leon', 'leonhoog@outlook.com'),
Contributor('stephen-cusi', 'magiskcurry@qq.com'), Contributor('stephen-cusi', 'magiskcurry@qq.com'),
Contributor('atilluF', '110931720+atilluF@users.noreply.github.com'),
// Contributor('SAMIRAH AIL', 'samiratalzahrani@gmail.com'), // Arabic // Contributor('SAMIRAH AIL', 'samiratalzahrani@gmail.com'), // Arabic
// Contributor('Salih Ail', 'rrrfff444@gmail.com'), // Arabic // Contributor('Salih Ail', 'rrrfff444@gmail.com'), // Arabic
// Contributor('nasreddineloukriz', 'nasreddineloukriz@gmail.com'), // Arabic // Contributor('nasreddineloukriz', 'nasreddineloukriz@gmail.com'), // Arabic

View file

@ -29,6 +29,7 @@ adb.exe shell setprop log.tag.J4A INFO
adb.exe shell setprop log.tag.MediaCodec WARN adb.exe shell setprop log.tag.MediaCodec WARN
adb.exe shell setprop log.tag.MediaMetadataRetriever INFO adb.exe shell setprop log.tag.MediaMetadataRetriever INFO
adb.exe shell setprop log.tag.MediaMetadataRetrieverJNI INFO adb.exe shell setprop log.tag.MediaMetadataRetrieverJNI INFO
adb.exe shell setprop log.tag.NativeTiffDecoder INFO
adb.exe shell setprop log.tag.NuMediaExtractor INFO adb.exe shell setprop log.tag.NuMediaExtractor INFO
adb.exe shell setprop log.tag.PipelineWatcher INFO adb.exe shell setprop log.tag.PipelineWatcher INFO
adb.exe shell setprop log.tag.ReflectedParamUpdater INFO adb.exe shell setprop log.tag.ReflectedParamUpdater INFO

View file

@ -21,6 +21,7 @@ adb shell setprop log.tag.J4A INFO
adb shell setprop log.tag.MediaCodec WARN adb shell setprop log.tag.MediaCodec WARN
adb shell setprop log.tag.MediaMetadataRetriever INFO adb shell setprop log.tag.MediaMetadataRetriever INFO
adb shell setprop log.tag.MediaMetadataRetrieverJNI INFO adb shell setprop log.tag.MediaMetadataRetrieverJNI INFO
adb shell setprop log.tag.NativeTiffDecoder INFO
adb shell setprop log.tag.NuMediaExtractor INFO adb shell setprop log.tag.NuMediaExtractor INFO
adb shell setprop log.tag.PipelineWatcher INFO adb shell setprop log.tag.PipelineWatcher INFO
adb shell setprop log.tag.ReflectedParamUpdater INFO adb shell setprop log.tag.ReflectedParamUpdater INFO

View file

@ -640,198 +640,20 @@
], ],
"be": [ "be": [
"columnCount",
"timeSeconds",
"timeMinutes",
"timeDays",
"entryActionExport",
"entryActionInfo",
"entryActionRename",
"entryActionRestore",
"entryActionRotateCCW",
"entryActionRotateCW",
"entryActionFlip",
"entryActionPrint",
"entryActionShare",
"entryActionShareImageOnly",
"entryActionShareVideoOnly",
"entryActionViewSource",
"entryActionShowGeoTiffOnMap",
"entryActionConvertMotionPhotoToStillImage",
"entryActionViewMotionPhotoVideo",
"entryActionEdit",
"entryActionOpen",
"entryActionSetAs",
"entryActionOpenMap",
"entryActionRotateScreen",
"entryActionAddFavourite",
"entryActionRemoveFavourite",
"videoActionCaptureFrame",
"videoActionMute",
"videoActionUnmute",
"videoActionPause",
"videoActionPlay",
"videoActionReplay10",
"videoActionSkip10",
"videoActionSelectStreams",
"videoActionSetSpeed",
"viewerActionSettings",
"viewerActionLock",
"viewerActionUnlock",
"slideshowActionResume",
"slideshowActionShowInCollection",
"entryInfoActionEditDate",
"entryInfoActionEditLocation",
"entryInfoActionEditTitleDescription",
"entryInfoActionEditRating",
"entryInfoActionEditTags",
"entryInfoActionRemoveMetadata",
"entryInfoActionExportMetadata",
"entryInfoActionRemoveLocation",
"editorActionTransform",
"editorTransformCrop",
"editorTransformRotate",
"cropAspectRatioFree",
"cropAspectRatioOriginal",
"cropAspectRatioSquare",
"filterAspectRatioLandscapeLabel",
"filterAspectRatioPortraitLabel",
"filterBinLabel",
"filterFavouriteLabel",
"filterNoDateLabel",
"filterNoAddressLabel",
"filterLocatedLabel",
"filterNoLocationLabel",
"filterNoRatingLabel",
"filterTaggedLabel",
"filterNoTagLabel",
"filterNoTitleLabel",
"filterOnThisDayLabel",
"filterRecentlyAddedLabel",
"filterRatingRejectedLabel",
"filterTypeAnimatedLabel",
"filterTypeMotionPhotoLabel",
"filterTypePanoramaLabel",
"filterTypeRawLabel",
"filterTypeSphericalVideoLabel",
"filterTypeGeotiffLabel",
"filterMimeImageLabel",
"filterMimeVideoLabel",
"accessibilityAnimationsRemove",
"accessibilityAnimationsKeep",
"albumTierNew",
"albumTierPinned",
"albumTierSpecial",
"albumTierApps",
"albumTierVaults",
"albumTierRegular",
"coordinateFormatDms",
"coordinateFormatDecimal",
"coordinateDms",
"coordinateDmsNorth",
"coordinateDmsSouth",
"coordinateDmsEast",
"coordinateDmsWest",
"displayRefreshRatePreferHighest",
"displayRefreshRatePreferLowest",
"keepScreenOnNever",
"keepScreenOnVideoPlayback",
"keepScreenOnViewerOnly",
"keepScreenOnAlways",
"lengthUnitPixel",
"lengthUnitPercent",
"mapStyleGoogleNormal",
"mapStyleGoogleHybrid",
"mapStyleGoogleTerrain",
"mapStyleHuaweiNormal",
"mapStyleHuaweiTerrain",
"mapStyleOsmHot",
"mapStyleStamenToner",
"mapStyleStamenWatercolor",
"maxBrightnessNever",
"maxBrightnessAlways",
"nameConflictStrategyRename",
"nameConflictStrategyReplace",
"nameConflictStrategySkip",
"subtitlePositionTop",
"subtitlePositionBottom",
"themeBrightnessLight",
"themeBrightnessDark",
"themeBrightnessBlack",
"unitSystemMetric",
"unitSystemImperial",
"vaultLockTypePattern",
"vaultLockTypePin",
"vaultLockTypePassword",
"settingsVideoEnablePip",
"videoControlsPlay",
"videoControlsPlaySeek",
"videoControlsPlayOutside",
"videoControlsNone", "videoControlsNone",
"videoLoopModeNever",
"videoLoopModeShortOnly",
"videoLoopModeAlways",
"videoPlaybackSkip",
"videoPlaybackMuted",
"videoPlaybackWithSound",
"videoResumptionModeNever",
"videoResumptionModeAlways",
"viewerTransitionSlide", "viewerTransitionSlide",
"viewerTransitionParallax",
"viewerTransitionFade", "viewerTransitionFade",
"viewerTransitionZoomIn", "viewerTransitionZoomIn",
"viewerTransitionNone", "viewerTransitionNone",
"wallpaperTargetHome",
"wallpaperTargetLock",
"wallpaperTargetHomeLock",
"widgetDisplayedItemRandom", "widgetDisplayedItemRandom",
"widgetDisplayedItemMostRecent",
"widgetOpenPageHome", "widgetOpenPageHome",
"widgetOpenPageCollection", "widgetOpenPageCollection",
"widgetOpenPageViewer", "widgetOpenPageViewer",
"widgetTapUpdateWidget",
"storageVolumeDescriptionFallbackPrimary",
"storageVolumeDescriptionFallbackNonPrimary",
"rootDirectoryDescription",
"otherDirectoryDescription",
"storageAccessDialogMessage",
"restrictedAccessDialogMessage",
"notEnoughSpaceDialogMessage",
"missingSystemFilePickerDialogMessage",
"unsupportedTypeDialogMessage",
"nameConflictDialogSingleSourceMessage",
"nameConflictDialogMultipleSourceMessage",
"addShortcutDialogLabel",
"addShortcutButtonLabel",
"noMatchingAppDialogMessage",
"binEntriesConfirmationDialogMessage", "binEntriesConfirmationDialogMessage",
"deleteEntriesConfirmationDialogMessage", "deleteEntriesConfirmationDialogMessage",
"moveUndatedConfirmationDialogMessage",
"moveUndatedConfirmationDialogSetDate",
"videoResumeDialogMessage",
"videoStartOverButtonLabel",
"videoResumeButtonLabel",
"setCoverDialogLatest",
"setCoverDialogAuto",
"setCoverDialogCustom", "setCoverDialogCustom",
"hideFilterConfirmationDialogMessage", "hideFilterConfirmationDialogMessage",
"newAlbumDialogTitle",
"newAlbumDialogNameLabel",
"newAlbumDialogNameLabelAlreadyExistsHelper",
"newAlbumDialogStorageLabel",
"newVaultWarningDialogMessage", "newVaultWarningDialogMessage",
"newVaultDialogTitle",
"configureVaultDialogTitle",
"vaultDialogLockModeWhenScreenOff",
"vaultDialogLockTypeLabel",
"patternDialogEnter",
"patternDialogConfirm",
"pinDialogEnter",
"pinDialogConfirm",
"passwordDialogEnter",
"passwordDialogConfirm",
"authenticateToConfigureVault",
"authenticateToUnlockVault",
"vaultBinUsageDialogMessage", "vaultBinUsageDialogMessage",
"renameAlbumDialogLabel", "renameAlbumDialogLabel",
"renameAlbumDialogLabelAlreadyExistsHelper", "renameAlbumDialogLabelAlreadyExistsHelper",
@ -1905,16 +1727,6 @@
"aboutDataUsageExternal" "aboutDataUsageExternal"
], ],
"es": [
"aboutDataUsageSectionTitle",
"aboutDataUsageData",
"aboutDataUsageCache",
"aboutDataUsageDatabase",
"aboutDataUsageMisc",
"aboutDataUsageInternal",
"aboutDataUsageExternal"
],
"eu": [ "eu": [
"aboutDataUsageSectionTitle", "aboutDataUsageSectionTitle",
"aboutDataUsageData", "aboutDataUsageData",
@ -2436,16 +2248,6 @@
"filePickerUseThisFolder" "filePickerUseThisFolder"
], ],
"fr": [
"aboutDataUsageSectionTitle",
"aboutDataUsageData",
"aboutDataUsageCache",
"aboutDataUsageDatabase",
"aboutDataUsageMisc",
"aboutDataUsageInternal",
"aboutDataUsageExternal"
],
"gl": [ "gl": [
"columnCount", "columnCount",
"saveCopyButtonLabel", "saveCopyButtonLabel",
@ -4313,36 +4115,7 @@
"filePickerUseThisFolder" "filePickerUseThisFolder"
], ],
"hu": [
"aboutDataUsageSectionTitle",
"aboutDataUsageData",
"aboutDataUsageCache",
"aboutDataUsageDatabase",
"aboutDataUsageMisc",
"aboutDataUsageInternal",
"aboutDataUsageExternal"
],
"id": [
"aboutDataUsageSectionTitle",
"aboutDataUsageData",
"aboutDataUsageCache",
"aboutDataUsageDatabase",
"aboutDataUsageMisc",
"aboutDataUsageInternal",
"aboutDataUsageExternal"
],
"it": [ "it": [
"saveCopyButtonLabel",
"applyTooltip",
"editorActionTransform",
"editorTransformCrop",
"editorTransformRotate",
"cropAspectRatioFree",
"cropAspectRatioOriginal",
"cropAspectRatioSquare",
"widgetTapUpdateWidget",
"aboutDataUsageSectionTitle", "aboutDataUsageSectionTitle",
"aboutDataUsageData", "aboutDataUsageData",
"aboutDataUsageCache", "aboutDataUsageCache",
@ -4410,16 +4183,6 @@
"tagEditorDiscardDialogMessage" "tagEditorDiscardDialogMessage"
], ],
"ko": [
"aboutDataUsageSectionTitle",
"aboutDataUsageData",
"aboutDataUsageCache",
"aboutDataUsageDatabase",
"aboutDataUsageMisc",
"aboutDataUsageInternal",
"aboutDataUsageExternal"
],
"lt": [ "lt": [
"columnCount", "columnCount",
"saveCopyButtonLabel", "saveCopyButtonLabel",
@ -5954,15 +5717,6 @@
], ],
"pt": [ "pt": [
"saveCopyButtonLabel",
"applyTooltip",
"editorActionTransform",
"editorTransformCrop",
"editorTransformRotate",
"cropAspectRatioFree",
"cropAspectRatioOriginal",
"cropAspectRatioSquare",
"widgetTapUpdateWidget",
"aboutDataUsageSectionTitle", "aboutDataUsageSectionTitle",
"aboutDataUsageData", "aboutDataUsageData",
"aboutDataUsageCache", "aboutDataUsageCache",