Canon CR3 support
Canon CR3 support and Small UI fixes
@ -14,7 +14,7 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.simplemobiletools.gallery.pro"
|
||||
minSdkVersion 23
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 33
|
||||
versionCode 388
|
||||
versionName "6.26.7"
|
||||
@ -23,6 +23,12 @@ android {
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
storeFile file('/Users/nightrain/StudioProjects/Gallery-pro/release_keystore')
|
||||
storePassword 'GalleryRaw'
|
||||
keyAlias 'GalleryRaw'
|
||||
keyPassword 'GalleryRaw'
|
||||
}
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
release {
|
||||
keyAlias keystoreProperties['keyAlias']
|
||||
@ -80,7 +86,7 @@ android {
|
||||
dependencies {
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:925e7f9bd7'
|
||||
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
|
||||
implementation 'it.sephiroth.android.exif:library:1.0.1'
|
||||
implementation 'androidx.exifinterface:exifinterface:1.3.6'
|
||||
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.24'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
implementation 'com.google.android.exoplayer:exoplayer-core:2.9.6'
|
||||
@ -99,7 +105,7 @@ dependencies {
|
||||
exclude group: 'com.squareup.okhttp3', module: 'okhttp'
|
||||
}
|
||||
compileOnly 'com.squareup.okhttp3:okhttp:4.9.0'
|
||||
|
||||
implementation project(path: ':libraw')
|
||||
kapt 'com.github.bumptech.glide:compiler:4.13.2'
|
||||
|
||||
kapt 'androidx.room:room-compiler:2.4.3'
|
||||
|
BIN
app/foss/release/gallery-388-foss-release.apk
Normal file
BIN
app/foss/release/gallery-388-foss-release.apk.zip
Normal file
20
app/foss/release/output-metadata.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"version": 3,
|
||||
"artifactType": {
|
||||
"type": "APK",
|
||||
"kind": "Directory"
|
||||
},
|
||||
"applicationId": "com.simplemobiletools.gallery.pro",
|
||||
"variantName": "fossRelease",
|
||||
"elements": [
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 388,
|
||||
"versionName": "6.26.7",
|
||||
"outputFile": "gallery-388-foss-release.apk"
|
||||
}
|
||||
],
|
||||
"elementType": "File"
|
||||
}
|
@ -57,8 +57,15 @@
|
||||
|
||||
<activity
|
||||
android:name=".activities.SplashActivity"
|
||||
android:exported="false"
|
||||
android:theme="@style/SplashTheme" />
|
||||
android:exported="true"
|
||||
android:theme="@style/SplashTheme">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".activities.MainActivity"
|
||||
@ -112,13 +119,20 @@
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="com.android.camera.action.REVIEW" />
|
||||
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
||||
<data android:mimeType="image/*" />
|
||||
<data android:mimeType="video/*" />
|
||||
</intent-filter>
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="content"/>
|
||||
<data android:host="*"/>
|
||||
<data android:mimeType="*/*" />
|
||||
<data android:pathPattern="*.*" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
@ -200,10 +214,10 @@
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
||||
<data android:scheme="content"/>
|
||||
<data android:host="*"/>
|
||||
<data android:mimeType="image/*" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
@ -214,10 +228,10 @@
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
||||
<data android:scheme="content"/>
|
||||
<data android:host="*"/>
|
||||
<data android:mimeType="video/*" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
@ -229,17 +243,13 @@
|
||||
android:label="@string/basic_editor">
|
||||
|
||||
<intent-filter android:name="foss-editor">
|
||||
|
||||
<action android:name="android.intent.action.EDIT" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
||||
<data android:mimeType="image/*" />
|
||||
</intent-filter>
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="com.android.camera.action.CROP" />
|
||||
|
||||
<data android:scheme="content" />
|
||||
<data android:scheme="file" />
|
||||
<data android:mimeType="image/*" />
|
||||
@ -257,15 +267,12 @@
|
||||
android:label="@string/simple_wallpaper">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.ATTACH_DATA" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
||||
<data android:mimeType="image/*" />
|
||||
</intent-filter>
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SET_WALLPAPER" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
@ -327,269 +334,5 @@
|
||||
android:exported="true"
|
||||
android:permission="android.permission.BIND_JOB_SERVICE" />
|
||||
|
||||
<activity-alias
|
||||
android:name=".activities.SplashActivity.Red"
|
||||
android:enabled="false"
|
||||
android:exported="true"
|
||||
android:icon="@mipmap/ic_launcher_red"
|
||||
android:roundIcon="@mipmap/ic_launcher_red"
|
||||
android:targetActivity=".activities.SplashActivity">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity-alias>
|
||||
|
||||
<activity-alias
|
||||
android:name=".activities.SplashActivity.Pink"
|
||||
android:enabled="false"
|
||||
android:exported="true"
|
||||
android:icon="@mipmap/ic_launcher_pink"
|
||||
android:roundIcon="@mipmap/ic_launcher_pink"
|
||||
android:targetActivity=".activities.SplashActivity">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity-alias>
|
||||
|
||||
<activity-alias
|
||||
android:name=".activities.SplashActivity.Purple"
|
||||
android:enabled="false"
|
||||
android:exported="true"
|
||||
android:icon="@mipmap/ic_launcher_purple"
|
||||
android:roundIcon="@mipmap/ic_launcher_purple"
|
||||
android:targetActivity=".activities.SplashActivity">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity-alias>
|
||||
|
||||
<activity-alias
|
||||
android:name=".activities.SplashActivity.Deep_purple"
|
||||
android:enabled="false"
|
||||
android:exported="true"
|
||||
android:icon="@mipmap/ic_launcher_deep_purple"
|
||||
android:roundIcon="@mipmap/ic_launcher_deep_purple"
|
||||
android:targetActivity=".activities.SplashActivity">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity-alias>
|
||||
|
||||
<activity-alias
|
||||
android:name=".activities.SplashActivity.Indigo"
|
||||
android:enabled="false"
|
||||
android:exported="true"
|
||||
android:icon="@mipmap/ic_launcher_indigo"
|
||||
android:roundIcon="@mipmap/ic_launcher_indigo"
|
||||
android:targetActivity=".activities.SplashActivity">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity-alias>
|
||||
|
||||
<activity-alias
|
||||
android:name=".activities.SplashActivity.Blue"
|
||||
android:enabled="false"
|
||||
android:exported="true"
|
||||
android:icon="@mipmap/ic_launcher_blue"
|
||||
android:roundIcon="@mipmap/ic_launcher_blue"
|
||||
android:targetActivity=".activities.SplashActivity">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity-alias>
|
||||
|
||||
<activity-alias
|
||||
android:name=".activities.SplashActivity.Light_blue"
|
||||
android:enabled="false"
|
||||
android:exported="true"
|
||||
android:icon="@mipmap/ic_launcher_light_blue"
|
||||
android:roundIcon="@mipmap/ic_launcher_light_blue"
|
||||
android:targetActivity=".activities.SplashActivity">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity-alias>
|
||||
|
||||
<activity-alias
|
||||
android:name=".activities.SplashActivity.Cyan"
|
||||
android:enabled="false"
|
||||
android:exported="true"
|
||||
android:icon="@mipmap/ic_launcher_cyan"
|
||||
android:roundIcon="@mipmap/ic_launcher_cyan"
|
||||
android:targetActivity=".activities.SplashActivity">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity-alias>
|
||||
|
||||
<activity-alias
|
||||
android:name=".activities.SplashActivity.Teal"
|
||||
android:enabled="false"
|
||||
android:exported="true"
|
||||
android:icon="@mipmap/ic_launcher_teal"
|
||||
android:roundIcon="@mipmap/ic_launcher_teal"
|
||||
android:targetActivity=".activities.SplashActivity">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity-alias>
|
||||
|
||||
<activity-alias
|
||||
android:name=".activities.SplashActivity.Green"
|
||||
android:enabled="false"
|
||||
android:exported="true"
|
||||
android:icon="@mipmap/ic_launcher_green"
|
||||
android:roundIcon="@mipmap/ic_launcher_green"
|
||||
android:targetActivity=".activities.SplashActivity">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity-alias>
|
||||
|
||||
<activity-alias
|
||||
android:name=".activities.SplashActivity.Light_green"
|
||||
android:enabled="false"
|
||||
android:exported="true"
|
||||
android:icon="@mipmap/ic_launcher_light_green"
|
||||
android:roundIcon="@mipmap/ic_launcher_light_green"
|
||||
android:targetActivity=".activities.SplashActivity">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity-alias>
|
||||
|
||||
<activity-alias
|
||||
android:name=".activities.SplashActivity.Lime"
|
||||
android:enabled="false"
|
||||
android:exported="true"
|
||||
android:icon="@mipmap/ic_launcher_lime"
|
||||
android:roundIcon="@mipmap/ic_launcher_lime"
|
||||
android:targetActivity=".activities.SplashActivity">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity-alias>
|
||||
|
||||
<activity-alias
|
||||
android:name=".activities.SplashActivity.Yellow"
|
||||
android:enabled="false"
|
||||
android:exported="true"
|
||||
android:icon="@mipmap/ic_launcher_yellow"
|
||||
android:roundIcon="@mipmap/ic_launcher_yellow"
|
||||
android:targetActivity=".activities.SplashActivity">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity-alias>
|
||||
|
||||
<activity-alias
|
||||
android:name=".activities.SplashActivity.Amber"
|
||||
android:enabled="false"
|
||||
android:exported="true"
|
||||
android:icon="@mipmap/ic_launcher_amber"
|
||||
android:roundIcon="@mipmap/ic_launcher_amber"
|
||||
android:targetActivity=".activities.SplashActivity">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity-alias>
|
||||
|
||||
<activity-alias
|
||||
android:name=".activities.SplashActivity.Orange"
|
||||
android:enabled="true"
|
||||
android:exported="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:roundIcon="@mipmap/ic_launcher"
|
||||
android:targetActivity=".activities.SplashActivity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity-alias>
|
||||
|
||||
<activity-alias
|
||||
android:name=".activities.SplashActivity.Deep_orange"
|
||||
android:enabled="false"
|
||||
android:exported="true"
|
||||
android:icon="@mipmap/ic_launcher_deep_orange"
|
||||
android:roundIcon="@mipmap/ic_launcher_deep_orange"
|
||||
android:targetActivity=".activities.SplashActivity">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity-alias>
|
||||
|
||||
<activity-alias
|
||||
android:name=".activities.SplashActivity.Brown"
|
||||
android:enabled="false"
|
||||
android:exported="true"
|
||||
android:icon="@mipmap/ic_launcher_brown"
|
||||
android:roundIcon="@mipmap/ic_launcher_brown"
|
||||
android:targetActivity=".activities.SplashActivity">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity-alias>
|
||||
|
||||
<activity-alias
|
||||
android:name=".activities.SplashActivity.Blue_grey"
|
||||
android:enabled="false"
|
||||
android:exported="true"
|
||||
android:icon="@mipmap/ic_launcher_blue_grey"
|
||||
android:roundIcon="@mipmap/ic_launcher_blue_grey"
|
||||
android:targetActivity=".activities.SplashActivity">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity-alias>
|
||||
|
||||
<activity-alias
|
||||
android:name=".activities.SplashActivity.Grey_black"
|
||||
android:enabled="false"
|
||||
android:exported="true"
|
||||
android:icon="@mipmap/ic_launcher_grey_black"
|
||||
android:roundIcon="@mipmap/ic_launcher_grey_black"
|
||||
android:targetActivity=".activities.SplashActivity">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity-alias>
|
||||
</application>
|
||||
</manifest>
|
||||
|
BIN
app/src/main/ic_launcher-playstore.png
Normal file
After Width: | Height: | Size: 150 KiB |
@ -960,6 +960,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
||||
}
|
||||
|
||||
if (dirs.map { it.path }.contains(FAVORITES)) {
|
||||
|
||||
if (mediaDB.getFavoritesCount() > 0) {
|
||||
val favorites = Directory().apply {
|
||||
path = FAVORITES
|
||||
|
@ -7,6 +7,7 @@ import android.graphics.Bitmap
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.view.ActionMode
|
||||
import android.view.ViewGroup
|
||||
import android.widget.RelativeLayout
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
@ -235,6 +236,11 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
||||
}
|
||||
}
|
||||
|
||||
override fun onActionModeFinished(mode: ActionMode?) {
|
||||
refreshMenuItems()
|
||||
super.onActionModeFinished(mode)
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) {
|
||||
if (requestCode == REQUEST_EDIT_IMAGE) {
|
||||
if (resultCode == Activity.RESULT_OK && resultData != null) {
|
||||
@ -248,6 +254,8 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
||||
private fun refreshMenuItems() {
|
||||
val isDefaultFolder = !config.defaultFolder.isEmpty() && File(config.defaultFolder).compareTo(File(mPath)) == 0
|
||||
|
||||
val hasFavorites = mMedia.filterIsInstance<Medium>().any{ it.isFavorite }
|
||||
val hasNotFavorites = mMedia.filterIsInstance<Medium>().any{ !it.isFavorite }
|
||||
media_menu.getToolbar().menu.apply {
|
||||
findItem(R.id.group).isVisible = !config.scrollHorizontally
|
||||
|
||||
@ -270,6 +278,9 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
||||
val viewType = config.getFolderViewType(if (mShowAll) SHOW_ALL else mPath)
|
||||
findItem(R.id.column_count).isVisible = viewType == VIEW_TYPE_GRID
|
||||
findItem(R.id.toggle_filename).isVisible = viewType == VIEW_TYPE_GRID
|
||||
|
||||
findItem(R.id.select_favorites).isVisible = hasFavorites
|
||||
findItem(R.id.select_not_favorites).isVisible = hasNotFavorites
|
||||
}
|
||||
}
|
||||
|
||||
@ -306,6 +317,9 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
||||
R.id.slideshow -> startSlideshow()
|
||||
R.id.settings -> launchSettings()
|
||||
R.id.about -> launchAbout()
|
||||
R.id.select_all -> selectAll()
|
||||
R.id.select_favorites -> selectFavorites()
|
||||
R.id.select_not_favorites -> selectNotFavorites()
|
||||
else -> return@setOnMenuItemClickListener false
|
||||
}
|
||||
return@setOnMenuItemClickListener true
|
||||
@ -370,6 +384,18 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
||||
}
|
||||
}
|
||||
|
||||
private fun selectFavorites() {
|
||||
getMediaAdapter()?.selectFavorites(true)
|
||||
}
|
||||
|
||||
private fun selectNotFavorites() {
|
||||
getMediaAdapter()?.selectFavorites(false)
|
||||
}
|
||||
|
||||
private fun selectAll() {
|
||||
getMediaAdapter()?.selectAllItems()
|
||||
}
|
||||
|
||||
private fun tryLoadGallery() {
|
||||
handlePermission(getPermissionToRequest()) {
|
||||
if (it) {
|
||||
@ -438,7 +464,6 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
||||
} else {
|
||||
searchQueryChanged(mLastSearchedText)
|
||||
}
|
||||
|
||||
setupScrollDirection()
|
||||
}
|
||||
|
||||
@ -593,7 +618,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
||||
val newPaths = newMedia.mapNotNull { it as? Medium }.map { it.path }
|
||||
oldMedia.mapNotNull { it as? Medium }.filter { !newPaths.contains(it.path) }.forEach {
|
||||
if (mPath == FAVORITES && getDoesFilePathExist(it.path)) {
|
||||
favoritesDB.deleteFavoritePath(it.path)
|
||||
//favoritesDB.deleteFavoritePath(it.path)
|
||||
mediaDB.updateFavorite(it.path, false)
|
||||
} else {
|
||||
mediaDB.deleteMediumPath(it.path)
|
||||
@ -871,6 +896,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
||||
}
|
||||
media_fastscroller.beVisibleIf(media_empty_text_placeholder.isGone())
|
||||
setupAdapter()
|
||||
refreshMenuItems()
|
||||
}
|
||||
|
||||
mLatestMediaId = getLatestMediaId()
|
||||
|
@ -16,6 +16,7 @@ import com.simplemobiletools.gallery.pro.R
|
||||
import com.simplemobiletools.gallery.pro.dialogs.*
|
||||
import com.simplemobiletools.gallery.pro.extensions.*
|
||||
import com.simplemobiletools.gallery.pro.helpers.*
|
||||
import com.simplemobiletools.gallery.pro.helpers.FavoritesProxy.Companion.getFavoriteFromPath
|
||||
import com.simplemobiletools.gallery.pro.models.AlbumCover
|
||||
import kotlinx.android.synthetic.main.activity_settings.*
|
||||
import java.io.File
|
||||
|
@ -32,25 +32,7 @@ open class SimpleActivity : BaseSimpleActivity() {
|
||||
}
|
||||
|
||||
override fun getAppIconIDs() = arrayListOf(
|
||||
R.mipmap.ic_launcher_red,
|
||||
R.mipmap.ic_launcher_pink,
|
||||
R.mipmap.ic_launcher_purple,
|
||||
R.mipmap.ic_launcher_deep_purple,
|
||||
R.mipmap.ic_launcher_indigo,
|
||||
R.mipmap.ic_launcher_blue,
|
||||
R.mipmap.ic_launcher_light_blue,
|
||||
R.mipmap.ic_launcher_cyan,
|
||||
R.mipmap.ic_launcher_teal,
|
||||
R.mipmap.ic_launcher_green,
|
||||
R.mipmap.ic_launcher_light_green,
|
||||
R.mipmap.ic_launcher_lime,
|
||||
R.mipmap.ic_launcher_yellow,
|
||||
R.mipmap.ic_launcher_amber,
|
||||
R.mipmap.ic_launcher,
|
||||
R.mipmap.ic_launcher_deep_orange,
|
||||
R.mipmap.ic_launcher_brown,
|
||||
R.mipmap.ic_launcher_blue_grey,
|
||||
R.mipmap.ic_launcher_grey_black
|
||||
R.mipmap.ic_launcher
|
||||
)
|
||||
|
||||
override fun getAppLauncherName() = getString(R.string.app_launcher_name)
|
||||
|
@ -5,8 +5,8 @@ import com.simplemobiletools.commons.activities.BaseSplashActivity
|
||||
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
||||
import com.simplemobiletools.gallery.pro.extensions.config
|
||||
import com.simplemobiletools.gallery.pro.extensions.favoritesDB
|
||||
import com.simplemobiletools.gallery.pro.extensions.getFavoriteFromPath
|
||||
import com.simplemobiletools.gallery.pro.extensions.mediaDB
|
||||
import com.simplemobiletools.gallery.pro.helpers.FavoritesProxy
|
||||
import com.simplemobiletools.gallery.pro.models.Favorite
|
||||
|
||||
class SplashActivity : BaseSplashActivity() {
|
||||
@ -24,7 +24,7 @@ class SplashActivity : BaseSplashActivity() {
|
||||
val favorites = ArrayList<Favorite>()
|
||||
val favoritePaths = mediaDB.getFavorites().map { it.path }.toMutableList() as ArrayList<String>
|
||||
favoritePaths.forEach {
|
||||
favorites.add(getFavoriteFromPath(it))
|
||||
favorites.add(FavoritesProxy.getFavoriteFromPath(it))
|
||||
}
|
||||
favoritesDB.insertAll(favorites)
|
||||
|
||||
|
@ -428,7 +428,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||
val filename = mPath.getFilenameFromPath()
|
||||
val parent = mPath.getParentPath()
|
||||
val type = getTypeFromPath(mPath)
|
||||
val isFavorite = favoritesDB.isFavorite(mPath)
|
||||
val isFavorite = false
|
||||
val duration = if (type == TYPE_VIDEOS) getDuration(mPath) ?: 0 else 0
|
||||
val ts = System.currentTimeMillis()
|
||||
val medium = Medium(null, filename, mPath, parent, ts, ts, File(mPath).length(), type, duration, isFavorite, 0, 0L)
|
||||
@ -1064,13 +1064,13 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||
|
||||
val newFile = File(newPath)
|
||||
val newFileDirItem = FileDirItem(newPath, newPath.getFilenameFromPath())
|
||||
getFileOutputStream(newFileDirItem, true) {
|
||||
if (it != null) {
|
||||
saveBitmap(newFile, newBitmap, it, oldExif, File(oldPath).lastModified())
|
||||
} else {
|
||||
toast(R.string.image_editing_failed)
|
||||
}
|
||||
}
|
||||
//getFileOutputStream(newFileDirItem, true) {
|
||||
// if (it != null) {
|
||||
// saveBitmap(newFile, newBitmap, it, oldExif, File(oldPath).lastModified())
|
||||
// } else {
|
||||
// toast(R.string.image_editing_failed)
|
||||
// }
|
||||
//}
|
||||
} catch (e: OutOfMemoryError) {
|
||||
toast(R.string.out_of_memory_error)
|
||||
} catch (e: Exception) {
|
||||
|
@ -6,9 +6,8 @@ import android.content.pm.ShortcutManager
|
||||
import android.graphics.drawable.Icon
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.view.Menu
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.util.Log
|
||||
import android.view.*
|
||||
import android.widget.Toast
|
||||
import com.bumptech.glide.Glide
|
||||
import com.qtalk.recyclerviewfastscroller.RecyclerViewFastScroller
|
||||
@ -22,6 +21,7 @@ import com.simplemobiletools.commons.helpers.*
|
||||
import com.simplemobiletools.commons.models.FileDirItem
|
||||
import com.simplemobiletools.commons.views.MyRecyclerView
|
||||
import com.simplemobiletools.gallery.pro.R
|
||||
import com.simplemobiletools.gallery.pro.activities.MediaActivity
|
||||
import com.simplemobiletools.gallery.pro.activities.ViewPagerActivity
|
||||
import com.simplemobiletools.gallery.pro.dialogs.DeleteWithRememberDialog
|
||||
import com.simplemobiletools.gallery.pro.extensions.*
|
||||
@ -70,6 +70,7 @@ class MediaAdapter(
|
||||
var sorting = config.getFolderSorting(if (config.showAll) SHOW_ALL else path)
|
||||
var dateFormat = config.dateFormat
|
||||
var timeFormat = activity.getTimeFormat()
|
||||
private var menu: Menu? = null
|
||||
|
||||
init {
|
||||
setupDragListener(true)
|
||||
@ -132,7 +133,7 @@ class MediaAdapter(
|
||||
if (selectedItems.isEmpty()) {
|
||||
return
|
||||
}
|
||||
|
||||
this.menu = menu
|
||||
val isOneItemSelected = isOneItemSelected()
|
||||
val selectedPaths = selectedItems.map { it.path } as ArrayList<String>
|
||||
val isInRecycleBin = selectedItems.firstOrNull()?.getIsInRecycleBin() == true
|
||||
@ -180,6 +181,52 @@ class MediaAdapter(
|
||||
R.id.cab_fix_date_taken -> fixDateTaken()
|
||||
R.id.cab_set_as -> setAs()
|
||||
R.id.cab_delete -> checkDeleteConfirmation()
|
||||
R.id.check -> checkItems()
|
||||
}
|
||||
}
|
||||
|
||||
fun selectAllItems() {
|
||||
if (getSelectedItems().size == 0) {
|
||||
if (!actModeCallback.isSelectable) {
|
||||
activity.startActionMode(actModeCallback)
|
||||
selectAll()
|
||||
}
|
||||
} else {
|
||||
val cnt = itemCount - positionOffset
|
||||
for (i in 0 until cnt) {
|
||||
toggleItemSelection(false, i, false)
|
||||
}
|
||||
}
|
||||
}
|
||||
fun selectFavorites(selection: Boolean) {
|
||||
if (!actModeCallback.isSelectable) {
|
||||
activity.startActionMode(object: ActionMode.Callback {
|
||||
override fun onCreateActionMode(actionMode: ActionMode?, menu: Menu?): Boolean {
|
||||
return actModeCallback.onCreateActionMode(actionMode, menu)
|
||||
}
|
||||
|
||||
override fun onPrepareActionMode(actionMode: ActionMode?, menu: Menu?): Boolean {
|
||||
val cnt = itemCount - positionOffset
|
||||
for (i in 0 until cnt) {
|
||||
if (media[i] is Medium) {
|
||||
if ((media[i] as Medium).isFavorite) {
|
||||
toggleItemSelection(selection, i, true)
|
||||
} else {
|
||||
toggleItemSelection(!selection, i, true)
|
||||
}
|
||||
}
|
||||
}
|
||||
return actModeCallback.onPrepareActionMode(actionMode, menu)
|
||||
}
|
||||
|
||||
override fun onActionItemClicked(actionMode: ActionMode?, menuItem: MenuItem?): Boolean {
|
||||
return actModeCallback.onActionItemClicked(actionMode, menuItem)
|
||||
}
|
||||
|
||||
override fun onDestroyActionMode(actionMode: ActionMode?) {
|
||||
return actModeCallback.onDestroyActionMode(actionMode)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@ -332,8 +379,8 @@ class MediaAdapter(
|
||||
activity.toast(R.string.saving)
|
||||
ensureBackgroundThread {
|
||||
paths.forEach {
|
||||
rotatedImagePaths.add(it)
|
||||
activity.saveRotatedImageToFile(it, it, degrees, true) {
|
||||
rotatedImagePaths.add("rotated_" + it)
|
||||
activity.saveRotatedImageToFile(it, "rotated_" + it, degrees, true) {
|
||||
fileCnt--
|
||||
if (fileCnt == 0) {
|
||||
activity.runOnUiThread {
|
||||
@ -525,7 +572,7 @@ class MediaAdapter(
|
||||
}
|
||||
}
|
||||
|
||||
private fun getSelectedItems() = selectedKeys.mapNotNull { getItemWithKey(it) } as ArrayList<Medium>
|
||||
fun getSelectedItems() = selectedKeys.mapNotNull { getItemWithKey(it) } as ArrayList<Medium>
|
||||
|
||||
private fun getSelectedPaths() = getSelectedItems().map { it.path } as ArrayList<String>
|
||||
|
||||
@ -678,4 +725,8 @@ class MediaAdapter(
|
||||
|
||||
return (media[realIndex] as? Medium)?.getBubbleText(sorting, activity, dateFormat, timeFormat) ?: ""
|
||||
}
|
||||
|
||||
fun checkItems() {
|
||||
Log.d("", "")
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.commons.helpers.*
|
||||
import com.simplemobiletools.gallery.pro.R
|
||||
import com.simplemobiletools.gallery.pro.extensions.config
|
||||
import com.simplemobiletools.gallery.pro.helpers.Config.Companion.SORT_BY_FAVORITE
|
||||
import com.simplemobiletools.gallery.pro.helpers.SHOW_ALL
|
||||
import kotlinx.android.synthetic.main.dialog_change_sorting.view.*
|
||||
|
||||
@ -58,6 +59,7 @@ class ChangeSortingDialog(
|
||||
}
|
||||
|
||||
val sortBtn = when {
|
||||
currSorting and SORT_BY_FAVORITE != 0 -> sortingRadio.sorting_dialog_radio_favorite
|
||||
currSorting and SORT_BY_PATH != 0 -> sortingRadio.sorting_dialog_radio_path
|
||||
currSorting and SORT_BY_SIZE != 0 -> sortingRadio.sorting_dialog_radio_size
|
||||
currSorting and SORT_BY_DATE_MODIFIED != 0 -> sortingRadio.sorting_dialog_radio_last_modified
|
||||
@ -82,6 +84,7 @@ class ChangeSortingDialog(
|
||||
override fun onClick(dialog: DialogInterface, which: Int) {
|
||||
val sortingRadio = view.sorting_dialog_radio_sorting
|
||||
var sorting = when (sortingRadio.checkedRadioButtonId) {
|
||||
R.id.sorting_dialog_radio_favorite -> SORT_BY_FAVORITE
|
||||
R.id.sorting_dialog_radio_name -> SORT_BY_NAME
|
||||
R.id.sorting_dialog_radio_path -> SORT_BY_PATH
|
||||
R.id.sorting_dialog_radio_size -> SORT_BY_SIZE
|
||||
|
@ -2,6 +2,7 @@ package com.simplemobiletools.gallery.pro.extensions
|
||||
|
||||
import android.annotation.TargetApi
|
||||
import android.app.Activity
|
||||
import android.content.ActivityNotFoundException
|
||||
import android.content.ContentProviderOperation
|
||||
import android.content.ContentValues
|
||||
import android.content.Intent
|
||||
@ -13,6 +14,7 @@ import android.graphics.drawable.LayerDrawable
|
||||
import android.net.Uri
|
||||
import android.os.Build
|
||||
import android.os.Environment
|
||||
import android.os.TransactionTooLargeException
|
||||
import android.provider.MediaStore
|
||||
import android.provider.MediaStore.Files
|
||||
import android.provider.MediaStore.Images
|
||||
@ -47,8 +49,39 @@ import java.io.*
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
fun Activity.sharePathIntentAsCR2(path: String, applicationId: String) {
|
||||
ensureBackgroundThread {
|
||||
val newUri = getFinalUriFromPath(path, applicationId) ?: return@ensureBackgroundThread
|
||||
Intent().apply {
|
||||
action = Intent.ACTION_SEND
|
||||
putExtra(Intent.EXTRA_STREAM, newUri)
|
||||
type = "image/x-canon-cr2"
|
||||
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
||||
grantUriPermission("android", newUri, Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
||||
|
||||
try {
|
||||
startActivity(Intent.createChooser(this, getString(R.string.share_via)))
|
||||
} catch (e: ActivityNotFoundException) {
|
||||
toast(R.string.no_app_found)
|
||||
} catch (e: RuntimeException) {
|
||||
if (e.cause is TransactionTooLargeException) {
|
||||
toast(R.string.maximum_share_reached)
|
||||
} else {
|
||||
showErrorToast(e)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
showErrorToast(e)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun Activity.sharePath(path: String) {
|
||||
sharePathIntent(path, BuildConfig.APPLICATION_ID)
|
||||
if (path.lowercase().endsWith(".cr3")) {
|
||||
sharePathIntentAsCR2(path, BuildConfig.APPLICATION_ID)
|
||||
} else {
|
||||
sharePathIntent(path, BuildConfig.APPLICATION_ID)
|
||||
}
|
||||
}
|
||||
|
||||
fun Activity.sharePaths(paths: ArrayList<String>) {
|
||||
|
@ -8,17 +8,22 @@ import android.database.Cursor
|
||||
import android.graphics.Bitmap
|
||||
import android.graphics.drawable.PictureDrawable
|
||||
import android.media.AudioManager
|
||||
import android.net.Uri
|
||||
import android.os.Process
|
||||
import android.provider.MediaStore.Files
|
||||
import android.provider.MediaStore.Images
|
||||
import android.util.Log
|
||||
import android.widget.ImageView
|
||||
import com.bumptech.glide.Glide
|
||||
import com.bumptech.glide.Priority
|
||||
import com.bumptech.glide.load.DataSource
|
||||
import com.bumptech.glide.load.DecodeFormat
|
||||
import com.bumptech.glide.load.Transformation
|
||||
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
||||
import com.bumptech.glide.load.engine.GlideException
|
||||
import com.bumptech.glide.load.resource.bitmap.CenterCrop
|
||||
import com.bumptech.glide.load.resource.bitmap.FitCenter
|
||||
import com.bumptech.glide.load.resource.bitmap.Rotate
|
||||
import com.bumptech.glide.load.resource.bitmap.RoundedCorners
|
||||
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions
|
||||
import com.bumptech.glide.request.RequestListener
|
||||
@ -32,6 +37,7 @@ import com.simplemobiletools.gallery.pro.R
|
||||
import com.simplemobiletools.gallery.pro.asynctasks.GetMediaAsynctask
|
||||
import com.simplemobiletools.gallery.pro.databases.GalleryDatabase
|
||||
import com.simplemobiletools.gallery.pro.helpers.*
|
||||
import com.simplemobiletools.gallery.pro.helpers.Config.Companion.SORT_BY_FAVORITE
|
||||
import com.simplemobiletools.gallery.pro.interfaces.*
|
||||
import com.simplemobiletools.gallery.pro.models.*
|
||||
import com.simplemobiletools.gallery.pro.svg.SvgSoftwareLayerSetter
|
||||
@ -42,6 +48,7 @@ import java.io.FileInputStream
|
||||
import java.nio.ByteBuffer
|
||||
import java.nio.channels.FileChannel
|
||||
import kotlin.collections.set
|
||||
import com.homesoft.photo.libraw.LibRaw
|
||||
|
||||
val Context.audioManager get() = getSystemService(Context.AUDIO_SERVICE) as AudioManager
|
||||
|
||||
@ -58,7 +65,7 @@ val Context.mediaDB: MediumDao get() = GalleryDatabase.getInstance(applicationCo
|
||||
|
||||
val Context.directoryDB: DirectoryDao get() = GalleryDatabase.getInstance(applicationContext).DirectoryDao()
|
||||
|
||||
val Context.favoritesDB: FavoritesDao get() = GalleryDatabase.getInstance(applicationContext).FavoritesDao()
|
||||
val Context.favoritesDB: FavoritesProxy get() = FavoritesProxy(GalleryDatabase.getInstance(applicationContext).FavoritesDao())
|
||||
|
||||
val Context.dateTakensDB: DateTakensDao get() = GalleryDatabase.getInstance(applicationContext).DateTakensDao()
|
||||
|
||||
@ -535,23 +542,31 @@ fun Context.loadJpg(
|
||||
signature: ObjectKey,
|
||||
skipMemoryCacheAtPaths: ArrayList<String>? = null
|
||||
) {
|
||||
val options = RequestOptions()
|
||||
val orientation = getImageOrientationInDegrees(path)
|
||||
var options = RequestOptions()
|
||||
.signature(signature)
|
||||
.skipMemoryCache(skipMemoryCacheAtPaths?.contains(path) == true)
|
||||
// .skipMemoryCache(skipMemoryCacheAtPaths?.contains(path) == true)
|
||||
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
|
||||
.priority(Priority.LOW)
|
||||
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
|
||||
|
||||
if (cropThumbnails) options.centerCrop() else options.fitCenter()
|
||||
if (cropThumbnails) options = options.centerCrop() else options = options.fitCenter()
|
||||
|
||||
var builder = Glide.with(applicationContext)
|
||||
.load(path)
|
||||
.apply(options)
|
||||
.transition(DrawableTransitionOptions.withCrossFade())
|
||||
|
||||
val transformations = mutableListOf<Transformation<Bitmap>>(Rotate(orientation))
|
||||
if (cropThumbnails) {
|
||||
transformations.add(CenterCrop())
|
||||
}
|
||||
if (roundCorners != ROUNDED_CORNERS_NONE) {
|
||||
val cornerSize = if (roundCorners == ROUNDED_CORNERS_SMALL) R.dimen.rounded_corner_radius_small else R.dimen.rounded_corner_radius_big
|
||||
val cornerRadius = resources.getDimension(cornerSize).toInt()
|
||||
builder = builder.transform(CenterCrop(), RoundedCorners(cornerRadius))
|
||||
transformations.add(RoundedCorners(cornerRadius))
|
||||
}
|
||||
builder = builder.transform(*transformations.toTypedArray())
|
||||
|
||||
builder.into(target)
|
||||
}
|
||||
@ -791,7 +806,7 @@ fun Context.getCachedMedia(path: String, getVideosOnly: Boolean = false, getImag
|
||||
mediaDB.deleteMedia(*mediaToDelete.toTypedArray())
|
||||
|
||||
mediaToDelete.filter { it.isFavorite }.forEach {
|
||||
favoritesDB.deleteFavoritePath(it.path)
|
||||
//favoritesDB.deleteFavoritePath(it.path)
|
||||
}
|
||||
} catch (ignored: Exception) {
|
||||
}
|
||||
@ -851,12 +866,12 @@ fun Context.getFavoritePaths(): ArrayList<String> {
|
||||
}
|
||||
}
|
||||
|
||||
fun Context.getFavoriteFromPath(path: String) = Favorite(null, path, path.getFilenameFromPath(), path.getParentPath())
|
||||
|
||||
|
||||
fun Context.updateFavorite(path: String, isFavorite: Boolean) {
|
||||
try {
|
||||
if (isFavorite) {
|
||||
favoritesDB.insert(getFavoriteFromPath(path))
|
||||
favoritesDB.insert(FavoritesProxy.getFavoriteFromPath(path))
|
||||
} else {
|
||||
favoritesDB.deleteFavoritePath(path)
|
||||
}
|
||||
@ -1032,6 +1047,7 @@ fun Context.getDirectorySortingValue(media: ArrayList<Medium>, path: String, nam
|
||||
sorting and SORT_BY_SIZE != 0 -> return size.toString()
|
||||
sorting and SORT_BY_DATE_MODIFIED != 0 -> media.sortedBy { it.modified }
|
||||
sorting and SORT_BY_DATE_TAKEN != 0 -> media.sortedBy { it.taken }
|
||||
sorting and SORT_BY_FAVORITE != 0 -> media.sortedBy { it.isFavorite }
|
||||
else -> media
|
||||
}
|
||||
|
||||
@ -1105,3 +1121,41 @@ fun Context.getFileDateTaken(path: String): Long {
|
||||
|
||||
return 0L
|
||||
}
|
||||
|
||||
fun Context.getExifImageOrientation(path: String): Int {
|
||||
val uri = if (path.startsWith("content://")) {
|
||||
Uri.parse(path)
|
||||
} else {
|
||||
Uri.fromFile(File(path))
|
||||
}
|
||||
|
||||
try {
|
||||
val pfd = contentResolver.openFileDescriptor(
|
||||
uri, "r", null
|
||||
) ?: return 0
|
||||
|
||||
val libRaw = LibRaw.newInstance()
|
||||
|
||||
libRaw.use {
|
||||
val fd = pfd.detachFd()
|
||||
val result = libRaw.openFd(fd)
|
||||
val orientation = libRaw.orientation
|
||||
pfd.close()
|
||||
if (result != 0) {
|
||||
return 0
|
||||
}
|
||||
return orientation
|
||||
}
|
||||
|
||||
} catch (e: Exception) {
|
||||
Log.e("ERROR", e.toString())
|
||||
return 0
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun Context.getImageOrientationInDegrees(path: String): Int {
|
||||
val orientation = getExifImageOrientation(path)
|
||||
return LibRaw.toDegrees(orientation)
|
||||
}
|
||||
|
||||
|
@ -14,11 +14,13 @@ import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.util.DisplayMetrics
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.MotionEvent
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.RelativeLayout
|
||||
import androidx.exifinterface.media.ExifInterface
|
||||
import androidx.exifinterface.media.ExifInterface.*
|
||||
import com.alexvasilkov.gestures.GestureController
|
||||
import com.alexvasilkov.gestures.State
|
||||
@ -38,7 +40,6 @@ import com.davemorrissey.labs.subscaleview.ImageRegionDecoder
|
||||
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
|
||||
import com.github.penfeizhou.animation.apng.APNGDrawable
|
||||
import com.github.penfeizhou.animation.webp.WebPDrawable
|
||||
import com.simplemobiletools.commons.activities.BaseSimpleActivity
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
||||
import com.simplemobiletools.commons.helpers.isRPlus
|
||||
@ -49,14 +50,13 @@ import com.simplemobiletools.gallery.pro.activities.PhotoVideoActivity
|
||||
import com.simplemobiletools.gallery.pro.activities.ViewPagerActivity
|
||||
import com.simplemobiletools.gallery.pro.adapters.PortraitPhotosAdapter
|
||||
import com.simplemobiletools.gallery.pro.extensions.config
|
||||
import com.simplemobiletools.gallery.pro.extensions.saveRotatedImageToFile
|
||||
import com.simplemobiletools.gallery.pro.extensions.getImageOrientationInDegrees
|
||||
import com.simplemobiletools.gallery.pro.extensions.sendFakeClick
|
||||
import com.simplemobiletools.gallery.pro.helpers.*
|
||||
import com.simplemobiletools.gallery.pro.models.Medium
|
||||
import com.simplemobiletools.gallery.pro.svg.SvgSoftwareLayerSetter
|
||||
import com.squareup.picasso.Callback
|
||||
import com.squareup.picasso.Picasso
|
||||
import it.sephiroth.android.library.exif2.ExifInterface
|
||||
import kotlinx.android.synthetic.main.pager_photo_item.view.*
|
||||
import org.apache.sanselan.common.byteSources.ByteSourceInputStream
|
||||
import org.apache.sanselan.formats.jpeg.JpegImageParser
|
||||
@ -179,20 +179,16 @@ class PhotoFragment : ViewPagerFragment() {
|
||||
if (mMedium.path.isEmpty()) {
|
||||
var out: FileOutputStream? = null
|
||||
try {
|
||||
var inputStream = requireContext().contentResolver.openInputStream(Uri.parse(mOriginalPath))
|
||||
val exif = ExifInterface()
|
||||
exif.readExif(inputStream, ExifInterface.Options.OPTION_ALL)
|
||||
val tag = exif.getTag(ExifInterface.TAG_ORIENTATION)
|
||||
val orientation = tag?.getValueAsInt(-1) ?: -1
|
||||
inputStream = requireContext().contentResolver.openInputStream(Uri.parse(mOriginalPath))
|
||||
val degrees = requireContext().getImageOrientationInDegrees(mMedium.path)
|
||||
val inputStream = requireContext().contentResolver.openInputStream(Uri.parse(mOriginalPath))
|
||||
val original = BitmapFactory.decodeStream(inputStream)
|
||||
val rotated = rotateViaMatrix(original, orientation)
|
||||
exif.setTagValue(ExifInterface.TAG_ORIENTATION, 1)
|
||||
exif.removeCompressedThumbnail()
|
||||
val rotated = rotateViaMatrix(original, degrees)
|
||||
|
||||
val file = File(requireContext().externalCacheDir, Uri.parse(mOriginalPath).lastPathSegment)
|
||||
out = FileOutputStream(file)
|
||||
rotated.compress(Bitmap.CompressFormat.JPEG, 100, out)
|
||||
ensureBackgroundThread {
|
||||
rotated.compress(Bitmap.CompressFormat.JPEG, 100, out)
|
||||
}
|
||||
mMedium.path = file.absolutePath
|
||||
} catch (e: Exception) {
|
||||
requireActivity().toast(R.string.unknown_error_occurred)
|
||||
@ -269,7 +265,7 @@ class PhotoFragment : ViewPagerFragment() {
|
||||
if (mCurrentRotationDegrees != 0) {
|
||||
ensureBackgroundThread {
|
||||
val path = mMedium.path
|
||||
(activity as? BaseSimpleActivity)?.saveRotatedImageToFile(path, path, mCurrentRotationDegrees, false) {}
|
||||
// (activity as? BaseSimpleActivity)?.saveRotatedImageToFile(path, path, mCurrentRotationDegrees, false) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -369,7 +365,8 @@ class PhotoFragment : ViewPagerFragment() {
|
||||
}
|
||||
|
||||
ensureBackgroundThread {
|
||||
mImageOrientation = getImageOrientation()
|
||||
mImageOrientation = requireContext().getImageOrientationInDegrees(getFilePathToShow())
|
||||
mCurrentRotationDegrees = mImageOrientation
|
||||
activity?.runOnUiThread {
|
||||
when {
|
||||
mMedium.isGIF() -> loadGif()
|
||||
@ -448,11 +445,8 @@ class PhotoFragment : ViewPagerFragment() {
|
||||
.priority(priority)
|
||||
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
|
||||
.fitCenter()
|
||||
|
||||
if (mCurrentRotationDegrees != 0) {
|
||||
options.transform(Rotate(mCurrentRotationDegrees))
|
||||
options.diskCacheStrategy(DiskCacheStrategy.NONE)
|
||||
}
|
||||
.transform(Rotate(mCurrentRotationDegrees))
|
||||
.diskCacheStrategy(DiskCacheStrategy.NONE)
|
||||
|
||||
Glide.with(requireContext())
|
||||
.load(path)
|
||||
@ -762,36 +756,6 @@ class PhotoFragment : ViewPagerFragment() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun getImageOrientation(): Int {
|
||||
val defaultOrientation = -1
|
||||
var orient = defaultOrientation
|
||||
|
||||
try {
|
||||
val path = getFilePathToShow()
|
||||
orient = if (path.startsWith("content:/")) {
|
||||
val inputStream = requireContext().contentResolver.openInputStream(Uri.parse(path))
|
||||
val exif = ExifInterface()
|
||||
exif.readExif(inputStream, ExifInterface.Options.OPTION_ALL)
|
||||
val tag = exif.getTag(ExifInterface.TAG_ORIENTATION)
|
||||
tag?.getValueAsInt(defaultOrientation) ?: defaultOrientation
|
||||
} else {
|
||||
val exif = androidx.exifinterface.media.ExifInterface(path)
|
||||
exif.getAttributeInt(TAG_ORIENTATION, defaultOrientation)
|
||||
}
|
||||
|
||||
if (orient == defaultOrientation || requireContext().isPathOnOTG(getFilePathToShow())) {
|
||||
val uri = if (path.startsWith("content:/")) Uri.parse(path) else Uri.fromFile(File(path))
|
||||
val inputStream = requireContext().contentResolver.openInputStream(uri)
|
||||
val exif2 = ExifInterface()
|
||||
exif2.readExif(inputStream, ExifInterface.Options.OPTION_ALL)
|
||||
orient = exif2.getTag(ExifInterface.TAG_ORIENTATION)?.getValueAsInt(defaultOrientation) ?: defaultOrientation
|
||||
}
|
||||
} catch (ignored: Exception) {
|
||||
} catch (ignored: OutOfMemoryError) {
|
||||
}
|
||||
return orient
|
||||
}
|
||||
|
||||
private fun getDoubleTapZoomScale(width: Int, height: Int): Float {
|
||||
val bitmapAspectRatio = height / width.toFloat()
|
||||
val screenAspectRatio = mScreenHeight / mScreenWidth.toFloat()
|
||||
|
@ -13,6 +13,7 @@ import java.util.*
|
||||
class Config(context: Context) : BaseConfig(context) {
|
||||
companion object {
|
||||
fun newInstance(context: Context) = Config(context)
|
||||
const val SORT_BY_FAVORITE = 524288
|
||||
}
|
||||
|
||||
var directorySorting: Int
|
||||
|
@ -0,0 +1,66 @@
|
||||
package com.simplemobiletools.gallery.pro.helpers
|
||||
|
||||
import android.util.Log
|
||||
import com.simplemobiletools.commons.extensions.getFilenameFromPath
|
||||
import com.simplemobiletools.commons.extensions.getParentPath
|
||||
import com.simplemobiletools.gallery.pro.interfaces.FavoritesDao
|
||||
import com.simplemobiletools.gallery.pro.models.Favorite
|
||||
import java.io.File
|
||||
|
||||
|
||||
class FavoritesProxy(private val favoritesDao: FavoritesDao) {
|
||||
|
||||
companion object {
|
||||
const val TAG = "FavoritesProxy"
|
||||
|
||||
fun getFavoriteFromPath(path: String): Favorite {
|
||||
Log.d(TAG, "getFavoriteFromPath($path)")
|
||||
val file = File(path)
|
||||
return Favorite(null, path, path.getFilenameFromPath(), path.getParentPath(), file.lastModified())
|
||||
}
|
||||
}
|
||||
|
||||
fun deleteFavoritePath(path: String) {
|
||||
Log.d(TAG, "deleteFavoritePath($path)")
|
||||
favoritesDao.deleteFavoritePath(path)
|
||||
}
|
||||
|
||||
fun updateFavorite(newFilename: String, newPath: String, newParentPath: String, oldPath: String) {
|
||||
Log.d(TAG, "updateFavorite($newFilename, $newPath, $newParentPath, $oldPath)")
|
||||
return favoritesDao.updateFavorite(newFilename, newPath, newParentPath, oldPath)
|
||||
}
|
||||
|
||||
fun getValidFavoritePaths(): List<String> {
|
||||
val sb = java.lang.StringBuilder()
|
||||
favoritesDao.getValidFavoritePaths().forEach {
|
||||
sb.append("[$it], ")
|
||||
}
|
||||
Log.d(TAG, "getValidFavoritePaths -> " + sb.toString())
|
||||
return favoritesDao.getValidFavoritePaths()
|
||||
}
|
||||
|
||||
fun insert(favoriteFromPath: Favorite) {
|
||||
Log.d(TAG, "insert($favoriteFromPath)")
|
||||
favoritesDao.insert(favoriteFromPath)
|
||||
}
|
||||
|
||||
fun isFavorite(path: String): Boolean {
|
||||
Log.d(TAG, "isFavorite($path)")
|
||||
val file = File(path)
|
||||
return favoritesDao.isFavorite(path.getFilenameFromPath(), file.lastModified())
|
||||
}
|
||||
|
||||
fun insertAll(favorites: ArrayList<Favorite>) {
|
||||
val sb = java.lang.StringBuilder()
|
||||
favorites.forEach {
|
||||
sb.append("$it, ")
|
||||
}
|
||||
Log.d(TAG, "insertAll(${sb.toString()})")
|
||||
favoritesDao.insertAll(favorites)
|
||||
}
|
||||
|
||||
fun clearFavorites() {
|
||||
Log.d(TAG, "clearFavorites()")
|
||||
favoritesDao.clearFavorites()
|
||||
}
|
||||
}
|
@ -15,6 +15,7 @@ import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.commons.helpers.*
|
||||
import com.simplemobiletools.gallery.pro.R
|
||||
import com.simplemobiletools.gallery.pro.extensions.*
|
||||
import com.simplemobiletools.gallery.pro.helpers.Config.Companion.SORT_BY_FAVORITE
|
||||
import com.simplemobiletools.gallery.pro.models.Medium
|
||||
import com.simplemobiletools.gallery.pro.models.ThumbnailItem
|
||||
import com.simplemobiletools.gallery.pro.models.ThumbnailSection
|
||||
@ -415,7 +416,7 @@ class MediaFetcher(val context: Context) {
|
||||
else -> TYPE_IMAGES
|
||||
}
|
||||
|
||||
val isFavorite = favoritePaths.contains(path)
|
||||
val isFavorite = favoritePaths.contains(path) && file.exists()
|
||||
val medium = Medium(null, filename, path, file.parent, lastModified, dateTaken, size, type, videoDuration, isFavorite, 0L, 0L)
|
||||
media.add(medium)
|
||||
}
|
||||
@ -786,6 +787,7 @@ class MediaFetcher(val context: Context) {
|
||||
}
|
||||
sorting and SORT_BY_SIZE != 0 -> o1.size.compareTo(o2.size)
|
||||
sorting and SORT_BY_DATE_MODIFIED != 0 -> o1.modified.compareTo(o2.modified)
|
||||
sorting and SORT_BY_FAVORITE != 0 -> o1.isFavorite.compareTo(o2.isFavorite)
|
||||
else -> o1.taken.compareTo(o2.taken)
|
||||
}
|
||||
|
||||
|
@ -17,8 +17,8 @@ interface FavoritesDao {
|
||||
@Query("SELECT favorites.full_path FROM favorites INNER JOIN media ON favorites.full_path = media.full_path WHERE media.deleted_ts = 0")
|
||||
fun getValidFavoritePaths(): List<String>
|
||||
|
||||
@Query("SELECT id FROM favorites WHERE full_path = :path COLLATE NOCASE")
|
||||
fun isFavorite(path: String): Boolean
|
||||
@Query("SELECT id FROM favorites WHERE filename = :filename AND last_modified = :lastModified COLLATE NOCASE")
|
||||
fun isFavorite(filename: String, lastModified: Long): Boolean
|
||||
|
||||
@Query("UPDATE OR REPLACE favorites SET filename = :newFilename, full_path = :newFullPath, parent_path = :newParentPath WHERE full_path = :oldPath COLLATE NOCASE")
|
||||
fun updateFavorite(newFilename: String, newFullPath: String, newParentPath: String, oldPath: String)
|
||||
|
@ -10,5 +10,11 @@ data class Favorite(
|
||||
@PrimaryKey(autoGenerate = true) var id: Int?,
|
||||
@ColumnInfo(name = "full_path") var fullPath: String,
|
||||
@ColumnInfo(name = "filename") var filename: String,
|
||||
@ColumnInfo(name = "parent_path") var parentPath: String
|
||||
)
|
||||
@ColumnInfo(name = "parent_path") var parentPath: String,
|
||||
@ColumnInfo(name = "last_modified") var lastModified: Long
|
||||
) {
|
||||
override fun toString(): String {
|
||||
return "{ id: $id, fullPath: $fullPath, filename: $filename, parentPath: $parentPath, lastModified: $lastModified }"
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.commons.helpers.*
|
||||
import com.simplemobiletools.commons.models.FileDirItem
|
||||
import com.simplemobiletools.gallery.pro.helpers.*
|
||||
import com.simplemobiletools.gallery.pro.helpers.Config.Companion.SORT_BY_FAVORITE
|
||||
import java.io.File
|
||||
import java.io.Serializable
|
||||
import java.util.*
|
||||
@ -61,6 +62,7 @@ data class Medium(
|
||||
sorting and SORT_BY_SIZE != 0 -> size.formatSize()
|
||||
sorting and SORT_BY_DATE_MODIFIED != 0 -> modified.formatDate(context, dateFormat, timeFormat)
|
||||
sorting and SORT_BY_RANDOM != 0 -> name
|
||||
sorting and SORT_BY_FAVORITE != 0 -> if (isFavorite) "favorite" else "not favorite"
|
||||
else -> taken.formatDate(context)
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 101 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 158 KiB |
5
app/src/main/res/drawable/baseline_add_circle_24.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="#000000"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM17,13h-4v4h-2v-4L7,13v-2h4L11,7h2v4h4v2z"/>
|
||||
</vector>
|
5
app/src/main/res/drawable/baseline_check_box_24.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M19,3L5,3c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.11,0 2,-0.9 2,-2L21,5c0,-1.1 -0.89,-2 -2,-2zM10,17l-5,-5 1.41,-1.41L10,14.17l7.59,-7.59L19,8l-9,9z"/>
|
||||
</vector>
|
5
app/src/main/res/drawable/baseline_star_24.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M12,17.27L18.18,21l-1.64,-7.03L22,9.24l-7.19,-0.61L12,2 9.19,8.63 2,9.24l5.46,4.73L5.82,21z"/>
|
||||
</vector>
|
5
app/src/main/res/drawable/baseline_star_black_24.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="#000000"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M12,17.27L18.18,21l-1.64,-7.03L22,9.24l-7.19,-0.61L12,2 9.19,8.63 2,9.24l5.46,4.73L5.82,21z"/>
|
||||
</vector>
|
5
app/src/main/res/drawable/baseline_star_border_24.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M22,9.24l-7.19,-0.62L12,2 9.19,8.63 2,9.24l5.46,4.73L5.82,21 12,17.27 18.18,21l-1.63,-7.03L22,9.24zM12,15.4l-3.76,2.27 1,-4.28 -3.32,-2.88 4.38,-0.38L12,6.1l1.71,4.04 4.38,0.38 -3.32,2.88 1,4.28L12,15.4z"/>
|
||||
</vector>
|
@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="#000000"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M22,9.24l-7.19,-0.62L12,2 9.19,8.63 2,9.24l5.46,4.73L5.82,21 12,17.27 18.18,21l-1.63,-7.03L22,9.24zM12,15.4l-3.76,2.27 1,-4.28 -3.32,-2.88 4.38,-0.38L12,6.1l1.71,4.04 4.38,0.38 -3.32,2.88 1,4.28L12,15.4z"/>
|
||||
</vector>
|
74
app/src/main/res/drawable/ic_launcher_background.xml
Normal file
@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector
|
||||
android:height="108dp"
|
||||
android:width="108dp"
|
||||
android:viewportHeight="108"
|
||||
android:viewportWidth="108"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#3DDC84"
|
||||
android:pathData="M0,0h108v108h-108z"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
</vector>
|
@ -19,6 +19,12 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/medium_margin">
|
||||
|
||||
<com.simplemobiletools.commons.views.MyCompatRadioButton
|
||||
android:id="@+id/sorting_dialog_radio_favorite"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/favorites" />
|
||||
|
||||
<com.simplemobiletools.commons.views.MyCompatRadioButton
|
||||
android:id="@+id/sorting_dialog_radio_name"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -3,6 +3,18 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:ignore="AppCompatResource,AlwaysShowAction">
|
||||
<item
|
||||
android:id="@+id/cab_add_to_favorites"
|
||||
android:icon="@drawable/ic_star_vector"
|
||||
android:title="@string/add_to_favorites"
|
||||
app:showAsAction="always" />
|
||||
<item
|
||||
android:id="@+id/cab_remove_from_favorites"
|
||||
android:icon="@drawable/ic_star_outline_vector"
|
||||
android:title="@string/remove_from_favorites"
|
||||
app:showAsAction="always" />
|
||||
|
||||
|
||||
<item
|
||||
android:id="@+id/cab_confirm_selection"
|
||||
android:icon="@drawable/ic_check_vector"
|
||||
@ -88,16 +100,6 @@
|
||||
android:icon="@drawable/ic_edit_vector"
|
||||
android:title="@string/edit"
|
||||
app:showAsAction="ifRoom" />
|
||||
<item
|
||||
android:id="@+id/cab_add_to_favorites"
|
||||
android:icon="@drawable/ic_star_outline_vector"
|
||||
android:title="@string/add_to_favorites"
|
||||
app:showAsAction="ifRoom" />
|
||||
<item
|
||||
android:id="@+id/cab_remove_from_favorites"
|
||||
android:icon="@drawable/ic_star_vector"
|
||||
android:title="@string/remove_from_favorites"
|
||||
app:showAsAction="ifRoom" />
|
||||
<item
|
||||
android:id="@+id/cab_restore_recycle_bin_files"
|
||||
android:showAsAction="never"
|
||||
|
@ -3,6 +3,21 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:ignore="AppCompatResource">
|
||||
|
||||
<item
|
||||
android:id="@+id/check"
|
||||
android:icon="@drawable/baseline_check_box_24"
|
||||
android:title="@string/check"
|
||||
app:showAsAction="always">
|
||||
|
||||
<menu>
|
||||
<item android:id="@+id/select_all" android:title="@string/select_all" android:icon="@drawable/baseline_add_circle_24" />
|
||||
<item android:id="@+id/select_favorites" android:title="@string/select_favorites" android:icon="@drawable/baseline_star_black_24" />
|
||||
<item android:id="@+id/select_not_favorites" android:title="@string/select_not_favorites" android:icon="@drawable/baseline_star_border_black_24" />
|
||||
</menu>
|
||||
|
||||
</item>
|
||||
|
||||
<item
|
||||
android:id="@+id/toggle_filename"
|
||||
android:icon="@drawable/ic_label_vector"
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/md_orange_700" />
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
|
||||
<monochrome android:drawable="@drawable/ic_launcher_monochrome" />
|
||||
<background android:drawable="@drawable/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
5
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 9.1 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
Normal file
After Width: | Height: | Size: 4.9 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 15 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 33 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 59 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 24 KiB |
@ -382,6 +382,9 @@
|
||||
<string name="faq_17_text">That stopped working due to the system changes that came with Android 11 too, the app cannot browse real folders anymore, it relies on the so called MediaStore at fetching data.</string>
|
||||
<string name="faq_18_title">Why do I see ads during video playback?</string>
|
||||
<string name="faq_18_text">Our apps have no ads whatsoever. If you see them during video playback, you must be using some other apps video player. Try finding your default video player in the device settings, then do a \"Clear defaults\" on it. The next time you invoke some video intent you will see an app picker prompt, where you can select what app you want to use.</string>
|
||||
<string name="select_favorites">Select favorites</string>
|
||||
<string name="select_not_favorites">Select not favorites</string>
|
||||
<string name="check">Check</string>
|
||||
<!--
|
||||
Haven't found some strings? There's more at
|
||||
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res
|
||||
|
1
libraw/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/build
|
118
libraw/build.gradle
Normal file
@ -0,0 +1,118 @@
|
||||
plugins {
|
||||
id 'com.android.library'
|
||||
id 'maven-publish'
|
||||
}
|
||||
android {
|
||||
signingConfigs {
|
||||
release {
|
||||
storeFile file('/Users/nightrain/StudioProjects/Gallery-pro/release_keystore')
|
||||
storePassword 'GalleryRaw'
|
||||
keyAlias 'GalleryRaw'
|
||||
keyPassword 'GalleryRaw'
|
||||
}
|
||||
}
|
||||
compileSdk 33
|
||||
//ndkVersion "22.1.7171670"
|
||||
//Required for __fp16 support
|
||||
//ndkVersion "23.0.7599858"
|
||||
ndkVersion "23.1.7779620"
|
||||
defaultConfig {
|
||||
//Has to be 24 for 64-bit functions
|
||||
minSdk 24
|
||||
targetSdk 31
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles "consumer-rules.pro"
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
arguments "-DLIBRAW_PATH=${projectDir}/src/main/cpp/LibRaw/",
|
||||
//Hack to allow building LibRaw26
|
||||
"-DANDROID_PLATFORM=26",
|
||||
// You can manually include openMP by renameing jniLibsBak to jniLibs and commenting the entry below.
|
||||
// I noticed not performance increase, so I disabled it to reduce APK size
|
||||
// Also, the openMP build is broken, so it seems like it's fate.
|
||||
"-DENABLE_OPENMP=OFF",
|
||||
//Disable Jasper (JPEG 2000)
|
||||
"-DENABLE_JASPER=OFF"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Exclude the thread safe version - TODO figure out how not to compile them
|
||||
packagingOptions {
|
||||
exclude 'lib/**/libraw_r.so'
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
path "src/main/cpp/CMakeLists.txt"
|
||||
version '3.18.1'
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
}
|
||||
def injectDependenciesInPom(pom) {
|
||||
pom.withXml {
|
||||
def dependenciesNode = asNode().appendNode('dependencies')
|
||||
|
||||
configurations.implementation.allDependencies.each { dependency ->
|
||||
if (!dependency.version.equals("unspecified") &&
|
||||
!dependency.group.equals("unspecified") &&
|
||||
!dependency.name.equals("unspecified")) {
|
||||
def dependencyNode = dependenciesNode.appendNode('dependency')
|
||||
dependencyNode.appendNode('groupId', dependency.group)
|
||||
dependencyNode.appendNode('artifactId', dependency.name)
|
||||
dependencyNode.appendNode('version', dependency.version)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//Install to local maven repo
|
||||
//gradlew libraw:publishToMavenLocal
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
libRaw(MavenPublication) {
|
||||
groupId = "${rootProject.ext.groupId}"
|
||||
artifactId = "${rootProject.ext.artifactId}"
|
||||
version "${rootProject.ext.artifactVersion}"
|
||||
artifact("$buildDir/outputs/aar/${rootProject.ext.artifactId}-release.aar")
|
||||
|
||||
injectDependenciesInPom(pom)
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
name = "GitHubPackages"
|
||||
/** Configure path of your package repository on Github
|
||||
** Replace GITHUB_USERID with your/organisation Github userID
|
||||
** and REPOSITORY with the repository name on GitHub
|
||||
*/
|
||||
url = uri("https://maven.pkg.github.com/dburckh/AndroidLibRaw")
|
||||
credentials {
|
||||
/** Create github.properties in root project folder file with
|
||||
** gpr.usr=GITHUB_USER_ID & gpr.key=PERSONAL_ACCESS_TOKEN
|
||||
** Set env variable GPR_USER & GPR_API_KEY if not adding a properties file**/
|
||||
|
||||
username = System.getenv("GPR_USER")
|
||||
password = System.getenv("GPR_API_KEY")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'androidx.annotation:annotation:1.3.0'
|
||||
testImplementation 'junit:junit:4.+'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||
}
|
3
libraw/consumer-rules.pro
Normal file
@ -0,0 +1,3 @@
|
||||
-keep class com.homesoft.photo.libraw.LibRaw {
|
||||
long mNativeContext;
|
||||
}
|
21
libraw/proguard-rules.pro
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
@ -0,0 +1,26 @@
|
||||
package com.homesoft.photo.libraw;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ExampleInstrumentedTest {
|
||||
@Test
|
||||
public void useAppContext() {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
|
||||
assertEquals("com.homesoft.photo.libraw.test", appContext.getPackageName());
|
||||
}
|
||||
}
|
5
libraw/src/main/AndroidManifest.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.homesoft.photo.libraw">
|
||||
|
||||
</manifest>
|
223
libraw/src/main/cpp/AndroidLibRaw.cpp
Normal file
@ -0,0 +1,223 @@
|
||||
//
|
||||
// Created by dburc on 1/2/2022.
|
||||
//
|
||||
|
||||
#include "AndroidLibRaw.h"
|
||||
#include "common.h"
|
||||
#include <android/bitmap.h>
|
||||
#include <android/native_window_jni.h>
|
||||
|
||||
#define P1 imgdata.idata
|
||||
#define S imgdata.sizes
|
||||
#define O imgdata.params
|
||||
#define C imgdata.color
|
||||
#define IO libraw_internal_data.internal_output_params
|
||||
#define SHORT2FLOAT 65535.0f;
|
||||
#define COLORS 3
|
||||
#define PIXEL8_LOOP \
|
||||
for (int c=0;c<COLORS;c++) { \
|
||||
*ptr = imgdata.color.curve[imgdata.image[pixel][c]] >> 8; \
|
||||
ptr++; \
|
||||
} \
|
||||
|
||||
#define PIXEL8A_LOOP PIXEL8_LOOP \
|
||||
*ptr = 0xff; \
|
||||
ptr++; \
|
||||
|
||||
#define PIXEL16_LOOP \
|
||||
for (int c = 0; c < COLORS; c++) { \
|
||||
*ptr = imgdata.color.curve[imgdata.image[pixel][c]] / SHORT2FLOAT; \
|
||||
ptr++; \
|
||||
} \
|
||||
*ptr = 1.0; \
|
||||
ptr++; \
|
||||
|
||||
jfieldID contextFieldID = nullptr;
|
||||
|
||||
AndroidLibRaw* getLibRaw(JNIEnv* env, jobject jLibRaw) {
|
||||
if (contextFieldID == nullptr) {
|
||||
contextFieldID = env->GetFieldID(env->GetObjectClass(jLibRaw), "mNativeContext", "J");
|
||||
}
|
||||
return (AndroidLibRaw*)env->GetLongField(jLibRaw, contextFieldID);
|
||||
}
|
||||
AndroidLibRaw::AndroidLibRaw(unsigned int flags):LibRaw(flags) {
|
||||
}
|
||||
|
||||
jobject AndroidLibRaw::doGetBitmap(JNIEnv* env, const char* configName, int32_t configType, const std::function<void (void*, int const)>& _copy) {
|
||||
if (imgdata.idata.colors != COLORS) {
|
||||
__android_log_print(ANDROID_LOG_ERROR,"libraw","expected 3 colors, got %i", P1.colors);
|
||||
return nullptr;
|
||||
}
|
||||
if (imgdata.image == nullptr) {
|
||||
__android_log_write(ANDROID_LOG_ERROR,"libraw","No image data. Did you call dcrawProcess?");
|
||||
return nullptr;
|
||||
}
|
||||
int width = imgdata.sizes.iwidth;
|
||||
int height = imgdata.sizes.iheight;
|
||||
|
||||
jobject bitmapConfig = getConfigByName(env, configName);
|
||||
jobject bitmap = createBitmap(env, bitmapConfig, width, height);
|
||||
void* addrPtr;
|
||||
AndroidBitmap_lockPixels(env,bitmap, &addrPtr);
|
||||
_copy(addrPtr, width * height);
|
||||
AndroidBitmap_unlockPixels(env,bitmap);
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
jobject AndroidLibRaw::getBitmap(JNIEnv* env) {
|
||||
return doGetBitmap(env, "ARGB_8888", ANDROID_BITMAP_FORMAT_RGBA_8888, [this](void* bitmapPtr, int const pixels) {
|
||||
auto ptr = (unsigned char*)bitmapPtr;
|
||||
for(int pixel=0; pixel < pixels;pixel++) {
|
||||
PIXEL8A_LOOP
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
jobject AndroidLibRaw::getBitmap16(JNIEnv *env) {
|
||||
return doGetBitmap(env, "RGBA_F16", ANDROID_BITMAP_FORMAT_RGBA_F16, [this](void* bitmapPtr, int const pixels) {
|
||||
auto ptr = (__fp16 *) bitmapPtr;
|
||||
for (int pixel = 0; pixel < pixels; pixel++) {
|
||||
PIXEL16_LOOP
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void AndroidLibRaw::buildColorCurve() {
|
||||
//Copied from copy_mem_image()
|
||||
if (libraw_internal_data.output_data.histogram)
|
||||
{
|
||||
int perc, val, total, t_white = 0x2000, c;
|
||||
perc = S.width * S.height * O.auto_bright_thr;
|
||||
if (IO.fuji_width)
|
||||
perc /= 2;
|
||||
if (!((O.highlight & ~2) || O.no_auto_bright))
|
||||
for (t_white = c = 0; c < P1.colors; c++)
|
||||
{
|
||||
for (val = 0x2000, total = 0; --val > 32;)
|
||||
if ((total += libraw_internal_data.output_data.histogram[c][val]) >
|
||||
perc)
|
||||
break;
|
||||
if (t_white < val)
|
||||
t_white = val;
|
||||
}
|
||||
gamma_curve(O.gamm[0], O.gamm[1], 2, (t_white << 3) / O.bright);
|
||||
}
|
||||
}
|
||||
|
||||
jobject AndroidLibRaw::getColorCurve(JNIEnv* env) {
|
||||
auto size = sizeof imgdata.color.curve;
|
||||
void* c = malloc(size);
|
||||
memcpy(c, imgdata.color.curve, size);
|
||||
return env->NewDirectByteBuffer(c, size);
|
||||
}
|
||||
void AndroidLibRaw::setColorCurve(JNIEnv *env, jobject byteBuffer) {
|
||||
auto c = env->GetDirectBufferAddress(byteBuffer);
|
||||
auto size = env->GetDirectBufferCapacity(byteBuffer);
|
||||
memcpy(imgdata.color.curve, c, size);
|
||||
}
|
||||
|
||||
jobject AndroidLibRaw::getConfigByName(JNIEnv* env, const char* name) {
|
||||
jclass clBitmapConfig = env->FindClass("android/graphics/Bitmap$Config");
|
||||
jfieldID fidARGB_8888 = env->GetStaticFieldID(clBitmapConfig, name,
|
||||
"Landroid/graphics/Bitmap$Config;");
|
||||
return env->GetStaticObjectField(clBitmapConfig, fidARGB_8888);
|
||||
}
|
||||
|
||||
jobject AndroidLibRaw::createBitmap(JNIEnv* env, jobject config, jint width, jint height) {
|
||||
jclass clBitmap = env->FindClass("android/graphics/Bitmap");
|
||||
jmethodID midCreateBitmap = env->GetStaticMethodID(clBitmap, "createBitmap",
|
||||
"(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;");
|
||||
return env->CallStaticObjectMethod(clBitmap, midCreateBitmap, width, height, config);
|
||||
}
|
||||
|
||||
void AndroidLibRaw::setCaptureScaleMul(bool capture) {
|
||||
if (capture) {
|
||||
if (mScaleMul == nullptr) {
|
||||
mScaleMul = new float[4];
|
||||
}
|
||||
} else {
|
||||
if (mScaleMul) {
|
||||
free(mScaleMul);
|
||||
mScaleMul = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void AndroidLibRaw::scale_colors_loop(float scale_mul[4]) {
|
||||
if (mScaleMul && scale_mul != mScaleMul) {
|
||||
//store this info off for later user
|
||||
memcpy(mScaleMul, scale_mul, sizeof (float[4]));
|
||||
}
|
||||
LibRaw::scale_colors_loop(scale_mul);
|
||||
}
|
||||
|
||||
void AndroidLibRaw::preScaleCallback(void* ctx) {
|
||||
auto androidLibRaw = (AndroidLibRaw*)ctx;
|
||||
if (androidLibRaw->mScaleMul) {
|
||||
androidLibRaw->scale_colors_loop(androidLibRaw->mScaleMul);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Dirty little hack to force LibRaw to use the same white balance from a previous dcraw_process
|
||||
* @param env
|
||||
* @param colorCurve
|
||||
* @return
|
||||
*/
|
||||
jint AndroidLibRaw::dcrawProcessForced(JNIEnv* env, jobject colorCurve) {
|
||||
callbacks.pre_scalecolors_cb = preScaleCallback;
|
||||
imgdata.params.no_auto_scale=true;
|
||||
int rc = dcraw_process();
|
||||
imgdata.params.no_auto_scale=false;
|
||||
callbacks.pre_scalecolors_cb = nullptr;
|
||||
if (rc == 0) {
|
||||
setColorCurve(env, colorCurve);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
int AndroidLibRaw::copyImage(uint32_t width, uint32_t height, uint32_t stride, uint32_t format, void *bufferPtr) {
|
||||
auto pixels = width * height;
|
||||
|
||||
if (format == AHARDWAREBUFFER_FORMAT_R8G8B8_UNORM) {
|
||||
auto skip = (stride - width) * 3;
|
||||
auto ptr = static_cast<unsigned char *>(bufferPtr);
|
||||
uint32_t pixel = 0;
|
||||
while (pixel < pixels) {
|
||||
auto rowEnd = pixel + width;
|
||||
while (pixel < rowEnd) {
|
||||
PIXEL8_LOOP
|
||||
pixel++;
|
||||
}
|
||||
ptr += skip;
|
||||
}
|
||||
return 0;
|
||||
} else if (format == AHARDWAREBUFFER_FORMAT_R16G16B16A16_FLOAT) {
|
||||
auto skip = (stride - width) * 4;
|
||||
auto ptr = static_cast<__fp16 *>(bufferPtr);
|
||||
uint32_t pixel = 0;
|
||||
while (pixel < pixels) {
|
||||
auto rowEnd = pixel + width;
|
||||
while (pixel < rowEnd) {
|
||||
PIXEL16_LOOP
|
||||
pixel++;
|
||||
}
|
||||
ptr += skip;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
jboolean AndroidLibRaw::drawSurface(JNIEnv *env, jobject surface) {
|
||||
auto nativeWindow = ANativeWindow_fromSurface(env, surface);
|
||||
ANativeWindow_Buffer buffer;
|
||||
RET_CHECK(ANativeWindow_lock(nativeWindow, &buffer, nullptr));
|
||||
RET_CHECK(copyImage(buffer.width, buffer.height, buffer.stride, buffer.format, buffer.bits));
|
||||
RET_CHECK(ANativeWindow_unlockAndPost(nativeWindow));
|
||||
ANativeWindow_release(nativeWindow);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
37
libraw/src/main/cpp/AndroidLibRaw.h
Normal file
@ -0,0 +1,37 @@
|
||||
//
|
||||
// Created by dburc on 1/2/2022.
|
||||
//
|
||||
|
||||
#ifndef ANDROIDLIBRAW_ANDROIDLIBRAW_H
|
||||
#define ANDROIDLIBRAW_ANDROIDLIBRAW_H
|
||||
#include <libraw/libraw.h>
|
||||
#include <jni.h>
|
||||
|
||||
class AndroidLibRaw: public LibRaw {
|
||||
public:
|
||||
AndroidLibRaw(unsigned int flags = LIBRAW_OPTIONS_NONE);
|
||||
jobject getBitmap(JNIEnv* env);
|
||||
jobject getBitmap16(JNIEnv* env);
|
||||
jboolean drawSurface(JNIEnv* env, jobject surface);
|
||||
int copyImage(uint32_t width, uint32_t height, uint32_t stride, uint32_t format, void *bufferPtr);
|
||||
jobject getColorCurve(JNIEnv* env);
|
||||
void setColorCurve(JNIEnv* env, jobject byteBuffer);
|
||||
void setCaptureScaleMul(bool capture);
|
||||
void buildColorCurve();
|
||||
int dcrawProcessForced(JNIEnv* env, jobject colorCurve);
|
||||
static jobject getConfigByName(JNIEnv* env, const char* name);
|
||||
static jobject createBitmap(JNIEnv *env, jobject config, jint width, jint height);
|
||||
|
||||
protected:
|
||||
void scale_colors_loop(float scale_mul[4]) override;
|
||||
|
||||
private:
|
||||
float* mScaleMul = nullptr;
|
||||
jobject doGetBitmap(JNIEnv* env, const char* configName, int32_t configType, const std::function<void (void* bitmapPtr, int const pixels)>& _copy);
|
||||
|
||||
static void preScaleCallback(void *libRaw);
|
||||
};
|
||||
|
||||
AndroidLibRaw* getLibRaw(JNIEnv* env, jobject jLibRaw);
|
||||
|
||||
#endif //ANDROIDLIBRAW_ANDROIDLIBRAW_H
|
55
libraw/src/main/cpp/CMakeLists.txt
Normal file
@ -0,0 +1,55 @@
|
||||
# For more information about using CMake with Android Studio, read the
|
||||
# documentation: https://d.android.com/studio/projects/add-native-code.html
|
||||
|
||||
# Sets the minimum version of CMake required to build the native library.
|
||||
|
||||
cmake_minimum_required(VERSION 3.10.2)
|
||||
|
||||
# Declares and names the project.
|
||||
project("androidlibraw")
|
||||
|
||||
# Creates and names a library, sets it as either STATIC
|
||||
# or SHARED, and provides the relative paths to its source code.
|
||||
# You can define multiple libraries, and CMake builds them for you.
|
||||
# Gradle automatically packages shared libraries with your APK.
|
||||
|
||||
add_library( # Sets the name of the library.
|
||||
androidraw
|
||||
|
||||
# Sets the library as a shared library.
|
||||
SHARED
|
||||
|
||||
# Provides a relative path to your source file(s).
|
||||
anrdroidraw.cpp LibRaw_fd_datastream.cpp AndroidLibRaw.h AndroidLibRaw.cpp)
|
||||
|
||||
# Searches for a specified prebuilt library and stores the path as a
|
||||
# variable. Because CMake includes system libraries in the search path by
|
||||
# default, you only need to specify the name of the public NDK library
|
||||
# you want to add. CMake verifies that the library exists before
|
||||
# completing its build.
|
||||
|
||||
find_library( # Sets the name of the path variable.
|
||||
log-lib
|
||||
|
||||
# Specifies the name of the NDK library that
|
||||
# you want CMake to locate.
|
||||
log )
|
||||
set_target_properties(androidraw PROPERTIES COMPILE_OPTIONS -fopenmp)
|
||||
|
||||
# Specifies libraries CMake should link to your target library. You
|
||||
# can link multiple libraries, such as libraries you define in this
|
||||
# build script, prebuilt third-party libraries, or system libraries.
|
||||
target_link_libraries( # Specifies the target library.
|
||||
androidraw
|
||||
-landroid
|
||||
-ljnigraphics
|
||||
# this is broken see below
|
||||
# -fopenmp
|
||||
# Links the target library to the log library
|
||||
# included in the NDK.
|
||||
${log-lib} )
|
||||
add_subdirectory(LibRaw-cmake)
|
||||
add_subdirectory(androidraw26)
|
||||
|
||||
target_link_libraries(androidraw libraw::libraw)
|
||||
|
1
libraw/src/main/cpp/LibRaw-cmake/.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
||||
* text=auto
|
33
libraw/src/main/cpp/LibRaw-cmake/.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
name: CI
|
||||
|
||||
on: [push, pull_request, workflow_dispatch]
|
||||
|
||||
env:
|
||||
LIBRAW_GIT: https://github.com/LibRaw/LibRaw.git
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
libraw_ref: ['0.20.2', 'master']
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- run: git clone $LIBRAW_GIT -b ${{ matrix.libraw_ref }}
|
||||
name: Clone LibRaw
|
||||
|
||||
- run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DENABLE_OPENMP=OFF -DLIBRAW_PATH=$(pwd)/../LibRaw ..
|
||||
cmake --build .
|
||||
name: Build LibRaw
|
2
libraw/src/main/cpp/LibRaw-cmake/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/.project
|
||||
build
|
723
libraw/src/main/cpp/LibRaw-cmake/CMakeLists.txt
Normal file
@ -0,0 +1,723 @@
|
||||
# ===========================================================
|
||||
#
|
||||
# This file is a part of Libraw project
|
||||
# <a href="http://www.libraw.org">http://www.libraw.org</a>
|
||||
#
|
||||
# @date 2013-09-07
|
||||
# @brief Library for reading and processing of RAW images
|
||||
#
|
||||
# @author Copyright (C) 2013 by Gilles Caulier
|
||||
# <a href="mailto:caulier dot gilles at gmail dot com">caulier dot gilles at gmail dot com</a>
|
||||
#
|
||||
# This program is free software; you can redistribute it
|
||||
# and/or modify it under the terms of the GNU General
|
||||
# Public License as published by the Free Software Foundation;
|
||||
# either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# ============================================================
|
||||
|
||||
cmake_minimum_required(VERSION 3.12..16)
|
||||
|
||||
|
||||
# Determine if libraw is built as a subproject (using add_subdirectory)
|
||||
# or if it is the master project.
|
||||
set(MASTER_PROJECT OFF)
|
||||
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
|
||||
set(MASTER_PROJECT ON)
|
||||
message(STATUS "CMake version: ${CMAKE_VERSION}")
|
||||
endif ()
|
||||
|
||||
set(LIBRAW_PATH ${CMAKE_CURRENT_SOURCE_DIR} CACHE STRING "Relative path to libraw directory (default=CMAKE_CURRENT_SOURCE_DIR)")
|
||||
if(NOT EXISTS "${LIBRAW_PATH}")
|
||||
message(STATUS "LIBRAW_PATH=${LIBRAW_PATH}")
|
||||
message(FATAL_ERROR "LIBRAW_PATH does not contain a valid path to the libraw home")
|
||||
endif()
|
||||
|
||||
file(TO_CMAKE_PATH "${LIBRAW_PATH}" LIBRAW_PATH)
|
||||
|
||||
# ==================================================================================================
|
||||
# Library version info extraction
|
||||
|
||||
file(READ ${LIBRAW_PATH}/libraw/libraw_version.h _libraw_version_content)
|
||||
|
||||
# API version strings
|
||||
string(REGEX MATCH "#define LIBRAW_MAJOR_VERSION[ \t]*([0-9]*)\n" _version_major_match ${_libraw_version_content})
|
||||
set(RAW_LIB_MAJOR_VERSION "${CMAKE_MATCH_1}")
|
||||
|
||||
string(REGEX MATCH "#define LIBRAW_MINOR_VERSION[ \t]*([0-9]*)\n" _version_minor_match ${_libraw_version_content})
|
||||
set(RAW_LIB_MINOR_VERSION "${CMAKE_MATCH_1}")
|
||||
|
||||
string(REGEX MATCH "#define LIBRAW_PATCH_VERSION[ \t]*([0-9]*)\n" _version_patch_match ${_libraw_version_content})
|
||||
set(RAW_LIB_PATCH_VERSION "${CMAKE_MATCH_1}")
|
||||
|
||||
# ABI version strings
|
||||
|
||||
string(REGEX MATCH "#define LIBRAW_SHLIB_CURRENT[ \t]*([0-9]*)\n" _version_socur_match ${_libraw_version_content})
|
||||
set(RAW_LIB_SO_CUR_VERSION "${CMAKE_MATCH_1}")
|
||||
|
||||
string(REGEX MATCH "#define LIBRAW_SHLIB_REVISION[ \t]*([0-9]*)\n" _version_sorev_match ${_libraw_version_content})
|
||||
set(RAW_LIB_SO_REV_VERSION "${CMAKE_MATCH_1}")
|
||||
|
||||
string(REGEX MATCH "#define LIBRAW_SHLIB_AGE[ \t]*([0-9]*)\n" _version_soage_match ${_libraw_version_content})
|
||||
set(RAW_LIB_SO_AGE_VERSION "${CMAKE_MATCH_1}")
|
||||
|
||||
# Set env. variables accordinly.
|
||||
set(RAW_LIB_VERSION_STRING "${RAW_LIB_MAJOR_VERSION}.${RAW_LIB_MINOR_VERSION}.${RAW_LIB_PATCH_VERSION}")
|
||||
set(RAW_LIB_VERSION_ID "0x${RAW_LIB_MAJOR_VERSION}${RAW_LIB_MINOR_VERSION}${RAW_LIB_PATCH_VERSION}")
|
||||
set(RAW_LIB_SO_VERSION_STRING "${RAW_LIB_SO_CUR_VERSION}.${RAW_LIB_SO_REV_VERSION}.${RAW_LIB_SO_AGE_VERSION}")
|
||||
|
||||
message(STATUS "LibRaw string version: ${RAW_LIB_VERSION_STRING}")
|
||||
message(STATUS "LibRaw ID version: ${RAW_LIB_VERSION_ID}")
|
||||
message(STATUS "LibRaw SO version: ${RAW_LIB_SO_VERSION_STRING}")
|
||||
|
||||
project(libraw VERSION ${RAW_LIB_VERSION_STRING} LANGUAGES CXX)
|
||||
|
||||
# ==================================================================================================
|
||||
# Project Options
|
||||
option(BUILD_SHARED_LIBS "Build library as shared library (default=ON)" ON)
|
||||
option(ENABLE_OPENMP "Build library with OpenMP support (default=ON)" ON)
|
||||
option(ENABLE_LCMS "Build library with LCMS support (default=ON)" ON)
|
||||
option(ENABLE_JASPER "Build library with libjasper support (default=ON)" ON)
|
||||
option(ENABLE_EXAMPLES "Build library with sample command-line programs (default=ON)" ${MASTER_PROJECT})
|
||||
option(ENABLE_RAWSPEED "Build library with extra RawSpeed codec support (default=OFF)" OFF)
|
||||
option(ENABLE_DCRAW_DEBUG "Build library with debug message from dcraw (default=OFF)" OFF)
|
||||
option(ENABLE_X3FTOOLS "Build library with Foveon X3F support (default=OFF)" OFF)
|
||||
option(ENABLE_6BY9RPI "Build library with Raspberry Pi RAW support (default=OFF)" OFF)
|
||||
option(LIBRAW_UNINSTALL_TARGET "Add a custom target to ease removal of installed targets" ${MASTER_PROJECT})
|
||||
option(LIBRAW_INSTALL "Generate the install target." ${MASTER_PROJECT})
|
||||
|
||||
set(RAWSPEED_RPATH "RawSpeed" CACHE STRING
|
||||
"Relative path to extra RawSpeed codec (default=RawSpeed)")
|
||||
|
||||
set(RAWSPEED_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${RAWSPEED_RPATH}")
|
||||
|
||||
# ==================================================================================================
|
||||
# General definitions rules
|
||||
|
||||
if(WIN32 AND NOT DEFINED CMAKE_DEBUG_POSTFIX)
|
||||
set(CMAKE_DEBUG_POSTFIX "d")
|
||||
endif()
|
||||
|
||||
# To prevent warnings from M$ compiler
|
||||
if(MSVC)
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||
add_definitions(-D_ATL_SECURE_NO_WARNINGS)
|
||||
add_definitions(-D_AFX_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
# -- Check dependencies --------------------------------------------------------------------------------
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH} )
|
||||
|
||||
include(MacroBoolTo01)
|
||||
include(MacroLogFeature)
|
||||
include(MacroOptionalFindPackage)
|
||||
|
||||
# Math library check
|
||||
|
||||
if(NOT WIN32)
|
||||
FIND_LIBRARY(MATH_LIBRARY m)
|
||||
endif()
|
||||
|
||||
# LCMS version 1 and 2 library check
|
||||
|
||||
set(LCMS_SUPPORT_CAN_BE_COMPILED false)
|
||||
set(LCMS2_FOUND false)
|
||||
set(LCMS_FOUND false)
|
||||
|
||||
if(ENABLE_LCMS)
|
||||
message(STATUS "Check for LCMS2 availability...")
|
||||
find_package(LCMS2)
|
||||
if(LCMS2_FOUND AND (LCMS2_VERSION VERSION_EQUAL 2.1 OR LCMS2_VERSION VERSION_GREATER 2.1))
|
||||
message(STATUS "Found LCMS2 : ${LCMS2_LIBRARIES} ${LCMS2_INCLUDE_DIR}")
|
||||
include_directories(${LCMS2_INCLUDE_DIR})
|
||||
MACRO_LOG_FEATURE(LCMS2_FOUND "LCMS2" "A small-footprint color management engine" "http://www.littlecms.com" FALSE "" "Needed by libkdcraw")
|
||||
# Flag to compile Little CMS version 2 with LibRaw
|
||||
add_definitions(-DUSE_LCMS2)
|
||||
set(LCMS_SUPPORT_CAN_BE_COMPILED true)
|
||||
else()
|
||||
message(STATUS "Check for LCMS availability instead LCMS2...")
|
||||
find_package(LCMS)
|
||||
if(LCMS_FOUND)
|
||||
message(STATUS "Found LCMS1: ${LCMS_LIBRARIES} ${LCMS_INCLUDE_DIR}")
|
||||
include_directories(${LCMS_INCLUDE_DIR})
|
||||
MACRO_LOG_FEATURE(LCMS_FOUND "LCMS1" "A small-footprint color management engine" "http://www.littlecms.com" TRUE "" "Needed by libkdcraw")
|
||||
# Flag to compile Little CMS version 1 with LibRaw
|
||||
add_definitions(-DUSE_LCMS)
|
||||
# For compatibility
|
||||
set(LCMS2_LIBRARIES ${LCMS_LIBRARIES})
|
||||
set(LCMS_SUPPORT_CAN_BE_COMPILED true)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# For registration to libraw_config.h
|
||||
MACRO_BOOL_TO_01(LCMS_SUPPORT_CAN_BE_COMPILED LIBRAW_USE_LCMS)
|
||||
|
||||
# zlib library check
|
||||
|
||||
find_package(ZLIB)
|
||||
find_package(JPEG)
|
||||
|
||||
# Flag to use zlib with LibRaw DNG deflate codec
|
||||
if(ZLIB_FOUND)
|
||||
add_definitions(-DUSE_ZLIB)
|
||||
endif()
|
||||
|
||||
# For registration to libraw_config.h
|
||||
MACRO_BOOL_TO_01(ZLIB_FOUND LIBRAW_USE_DNGDEFLATECODEC)
|
||||
|
||||
# JPEG library check
|
||||
find_package(JPEG)
|
||||
if(JPEG_FOUND)
|
||||
if (${JPEG_VERSION} LESS 80)
|
||||
set(JPEG8_FOUND FALSE)
|
||||
else()
|
||||
set(JPEG8_FOUND TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
MACRO_LOG_FEATURE(JPEG8_FOUND "libjpeg" "JPEG image format support" "http://www.ijg.org" FALSE "80" "needed for the LibRaw DNG lossy codec")
|
||||
|
||||
# Flag to use libjpeg with LibRaw DNG lossy codec
|
||||
if(JPEG8_FOUND)
|
||||
add_definitions(-DUSE_JPEG)
|
||||
add_definitions(-DUSE_JPEG8)
|
||||
endif()
|
||||
|
||||
# For registration to libraw_config.h
|
||||
MACRO_BOOL_TO_01(JPEG8_FOUND LIBRAW_USE_DNGLOSSYCODEC)
|
||||
|
||||
if(ENABLE_OPENMP)
|
||||
find_package(OpenMP REQUIRED)
|
||||
endif()
|
||||
|
||||
# For registration to libraw_config.h
|
||||
MACRO_BOOL_TO_01(OpenMP_FOUND LIBRAW_USE_OPENMP)
|
||||
|
||||
# Jasper library check
|
||||
set(JASPER_FOUND false)
|
||||
if(ENABLE_JASPER)
|
||||
find_package(Jasper)
|
||||
|
||||
# Flag to use libjasper with LibRaw RedCine codec
|
||||
if(JASPER_FOUND)
|
||||
add_definitions(-DUSE_JASPER)
|
||||
include_directories(${JASPER_INCLUDE_DIR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# For registration to libraw_config.h
|
||||
MACRO_BOOL_TO_01(JASPER_FOUND LIBRAW_USE_REDCINECODEC)
|
||||
|
||||
# For RawSpeed Codec Support
|
||||
|
||||
set(RAWSPEED_FOUND false)
|
||||
set(RAWSPEED_SUPPORT_CAN_BE_COMPILED false)
|
||||
|
||||
if(ENABLE_RAWSPEED)
|
||||
find_package(LibXml2)
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
message(STATUS "RawSpeed codec path: ${RAWSPEED_PATH}")
|
||||
|
||||
if(EXISTS "${RAWSPEED_PATH}/Common.cpp")
|
||||
set(RAWSPEED_FOUND true)
|
||||
else()
|
||||
message(STATUS "RawSpeed source code not found. Please checkout source code from RawStudio project website.")
|
||||
endif()
|
||||
|
||||
if(ENABLE_RAWSPEED AND RAWSPEED_FOUND AND JPEG8_FOUND AND LIBXML2_FOUND AND PTHREADS_FOUND)
|
||||
|
||||
set(RAWSPEED_SUPPORT_CAN_BE_COMPILED true)
|
||||
|
||||
else()
|
||||
if(NOT JPEG8_FOUND)
|
||||
message(STATUS "LibJPEG dependency not resolved. LibRaw cannot be compiled with RawSpeed codec")
|
||||
endif()
|
||||
|
||||
if(NOT LIBXML2_FOUND)
|
||||
message(STATUS "LibXML2 dependency not resolved. LibRaw cannot be compiled with RawSpeed codec")
|
||||
endif()
|
||||
|
||||
if(NOT PTHREADS_FOUND)
|
||||
message(STATUS "Pthreads dependency not resolved. LibRaw cannot be compiled with RawSpeed codec")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# For registration to libraw_config.h
|
||||
MACRO_BOOL_TO_01(RAWSPEED_SUPPORT_CAN_BE_COMPILED LIBRAW_USE_RAWSPEED)
|
||||
|
||||
# -- Compilation rules for RawSpeed library -------------------------------------------------------------
|
||||
|
||||
if(RAWSPEED_SUPPORT_CAN_BE_COMPILED)
|
||||
include_directories(${RAWSPEED_PATH})
|
||||
|
||||
include_directories(${LIBXML2_INCLUDE_DIR} ${PTHREADS_INCLUDE_DIR})
|
||||
|
||||
# Flag to include RawSpeed codec with Libraw
|
||||
add_definitions(-DUSE_RAWSPEED)
|
||||
|
||||
add_definitions(${LIBXML2_DEFINITIONS} ${PTHREADS_DEFINITIONS})
|
||||
|
||||
set(librawspeed_LIB_SRCS ${RAWSPEED_PATH}/ArwDecoder.cpp
|
||||
${RAWSPEED_PATH}/BitPumpJPEG.cpp
|
||||
${RAWSPEED_PATH}/BitPumpMSB.cpp
|
||||
${RAWSPEED_PATH}/BitPumpMSB32.cpp
|
||||
${RAWSPEED_PATH}/BitPumpPlain.cpp
|
||||
${RAWSPEED_PATH}/BlackArea.cpp
|
||||
${RAWSPEED_PATH}/ByteStream.cpp
|
||||
${RAWSPEED_PATH}/ByteStreamSwap.cpp
|
||||
${RAWSPEED_PATH}/Camera.cpp
|
||||
${RAWSPEED_PATH}/CameraMetaData.cpp
|
||||
${RAWSPEED_PATH}/CameraMetadataException.cpp
|
||||
${RAWSPEED_PATH}/CameraSensorInfo.cpp
|
||||
${RAWSPEED_PATH}/ColorFilterArray.cpp
|
||||
${RAWSPEED_PATH}/Common.cpp
|
||||
${RAWSPEED_PATH}/Cr2Decoder.cpp
|
||||
${RAWSPEED_PATH}/DngDecoder.cpp
|
||||
${RAWSPEED_PATH}/DngDecoderSlices.cpp
|
||||
${RAWSPEED_PATH}/DngOpcodes.cpp
|
||||
${RAWSPEED_PATH}/FileIOException.cpp
|
||||
${RAWSPEED_PATH}/FileMap.cpp
|
||||
${RAWSPEED_PATH}/IOException.cpp
|
||||
${RAWSPEED_PATH}/LJpegDecompressor.cpp
|
||||
${RAWSPEED_PATH}/LJpegPlain.cpp
|
||||
${RAWSPEED_PATH}/NefDecoder.cpp
|
||||
${RAWSPEED_PATH}/NikonDecompressor.cpp
|
||||
${RAWSPEED_PATH}/OrfDecoder.cpp
|
||||
${RAWSPEED_PATH}/PefDecoder.cpp
|
||||
${RAWSPEED_PATH}/PentaxDecompressor.cpp
|
||||
${RAWSPEED_PATH}/RawDecoder.cpp
|
||||
${RAWSPEED_PATH}/RawDecoderException.cpp
|
||||
${RAWSPEED_PATH}/RawImage.cpp
|
||||
${RAWSPEED_PATH}/RawImageDataFloat.cpp
|
||||
${RAWSPEED_PATH}/RawImageDataU16.cpp
|
||||
${RAWSPEED_PATH}/RawParser.cpp
|
||||
${RAWSPEED_PATH}/Rw2Decoder.cpp
|
||||
${RAWSPEED_PATH}/SrwDecoder.cpp
|
||||
${RAWSPEED_PATH}/TiffEntry.cpp
|
||||
${RAWSPEED_PATH}/TiffEntryBE.cpp
|
||||
${RAWSPEED_PATH}/TiffIFD.cpp
|
||||
${RAWSPEED_PATH}/TiffIFDBE.cpp
|
||||
${RAWSPEED_PATH}/TiffParser.cpp
|
||||
${RAWSPEED_PATH}/TiffParserException.cpp
|
||||
${RAWSPEED_PATH}/TiffParserHeaderless.cpp
|
||||
${RAWSPEED_PATH}/TiffParserOlympus.cpp
|
||||
)
|
||||
|
||||
endif()
|
||||
|
||||
# -- Common LibRaw library compilation rules ------------------------------------------------------------------
|
||||
|
||||
# Flag to add debug print on the console
|
||||
if(ENABLE_DCRAW_DEBUG)
|
||||
add_definitions(-DDCRAW_VERBOSE)
|
||||
endif()
|
||||
|
||||
# For registration to libraw_config.h
|
||||
MACRO_BOOL_TO_01(ENABLE_DCRAW_DEBUG LIBRAW_USE_DCRAW_DEBUG)
|
||||
|
||||
# Flag to add Foveon X3F support
|
||||
if(ENABLE_X3FTOOLS)
|
||||
add_definitions(-DUSE_X3FTOOLS)
|
||||
endif()
|
||||
|
||||
# For registration to libraw_config.h
|
||||
MACRO_BOOL_TO_01(ENABLE_X3FTOOLS LIBRAW_USE_X3FTOOLS)
|
||||
|
||||
# Flag to add Raspberry Pi RAW support
|
||||
if(ENABLE_6BY9RPI)
|
||||
add_definitions(-DUSE_6BY9RPI)
|
||||
endif()
|
||||
|
||||
# For registration to libraw_config.h
|
||||
MACRO_BOOL_TO_01(ENABLE_6BY9RPI LIBRAW_USE_6BY9RPI)
|
||||
|
||||
# Create a config header for client application.
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/data/libraw_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/libraw_config.h)
|
||||
|
||||
# Put the include dirs which are in the source or build tree
|
||||
# before all other include dirs, so the headers in the sources
|
||||
# are preferred over the already installed ones
|
||||
set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
|
||||
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/
|
||||
${LIBRAW_PATH}/
|
||||
)
|
||||
|
||||
# -- Log messages about configuration ------------------------------------------------------------------
|
||||
|
||||
message(STATUS "")
|
||||
message(STATUS "----------------------------------------------------------------------------------")
|
||||
message(STATUS " Libraw ${RAW_LIB_VERSION_STRING} configuration <http://www.libraw.org>")
|
||||
message(STATUS "")
|
||||
|
||||
if(OpenMP_FOUND)
|
||||
message(STATUS " Libraw will be compiled with OpenMP support .................. YES")
|
||||
else()
|
||||
message(STATUS " Libraw will be compiled with OpenMP support .................. NO")
|
||||
endif()
|
||||
|
||||
if(LCMS_SUPPORT_CAN_BE_COMPILED)
|
||||
message(STATUS " Libraw will be compiled with LCMS support .................... YES")
|
||||
else()
|
||||
message(STATUS " Libraw will be compiled with LCMS support .................... NO")
|
||||
endif()
|
||||
|
||||
if(ENABLE_EXAMPLES)
|
||||
message(STATUS " Libraw will be compiled with example command-line programs ... YES")
|
||||
else()
|
||||
message(STATUS " Libraw will be compiled with example command-line programs ... NO")
|
||||
endif()
|
||||
|
||||
if(JASPER_FOUND)
|
||||
message(STATUS " Libraw will be compiled with RedCine codec support ........... YES")
|
||||
else()
|
||||
message(STATUS " Libraw will be compiled with RedCine codec support ........... NO")
|
||||
endif()
|
||||
|
||||
if(ZLIB_FOUND)
|
||||
message(STATUS " Libraw will be compiled with DNG deflate codec support ....... YES")
|
||||
else()
|
||||
message(STATUS " Libraw will be compiled with DNG deflate codec support ....... NO")
|
||||
endif()
|
||||
|
||||
if(JPEG8_FOUND)
|
||||
message(STATUS " Libraw will be compiled with DNG lossy codec support ......... YES")
|
||||
else()
|
||||
message(STATUS " Libraw will be compiled with DNG lossy codec support ......... NO")
|
||||
endif()
|
||||
|
||||
if(RAWSPEED_SUPPORT_CAN_BE_COMPILED)
|
||||
message(STATUS " Libraw will be compiled with RawSpeed support ................ YES")
|
||||
else()
|
||||
message(STATUS " Libraw will be compiled with RawSpeed support ................ NO")
|
||||
endif()
|
||||
|
||||
if(ENABLE_DCRAW_DEBUG)
|
||||
message(STATUS " Libraw will be compiled with debug message from dcraw ........ YES")
|
||||
else()
|
||||
message(STATUS " Libraw will be compiled with debug message from dcraw ........ NO")
|
||||
endif()
|
||||
|
||||
if(ENABLE_X3FTOOLS)
|
||||
message(STATUS " Libraw will be compiled with Foveon X3F support .............. YES")
|
||||
else()
|
||||
message(STATUS " Libraw will be compiled with Foveon X3F support .............. NO")
|
||||
endif()
|
||||
|
||||
if(ENABLE_6BY9RPI)
|
||||
message(STATUS " Libraw will be compiled with Raspberry Pi RAW support ........ YES")
|
||||
else()
|
||||
message(STATUS " Libraw will be compiled with Raspberry Pi RAW support ........ NO")
|
||||
endif()
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
message(STATUS " Libraw will be compiled as a shared library")
|
||||
else()
|
||||
message(STATUS " Libraw will be compiled as a static library")
|
||||
endif()
|
||||
|
||||
message(STATUS "----------------------------------------------------------------------------------")
|
||||
message(STATUS "")
|
||||
|
||||
# -- Dedicated libraw target which does not support multi-threading ---------------------------------------
|
||||
|
||||
if(RAW_LIB_VERSION_STRING VERSION_LESS 0.21)
|
||||
set(libraw_LIB_SRCS ${LIBRAW_PATH}/internal/dcraw_common.cpp
|
||||
${LIBRAW_PATH}/internal/dcraw_fileio.cpp
|
||||
${LIBRAW_PATH}/internal/demosaic_packs.cpp
|
||||
${LIBRAW_PATH}/src/libraw_cxx.cpp
|
||||
${LIBRAW_PATH}/src/libraw_c_api.cpp
|
||||
${LIBRAW_PATH}/src/libraw_datastream.cpp
|
||||
)
|
||||
else()
|
||||
file(GLOB_RECURSE libraw_LIB_SRCS CONFIGURE_DEPENDS "${LIBRAW_PATH}/src/*.cpp")
|
||||
|
||||
# Exclude placeholder (stub) implementations
|
||||
file(GLOB_RECURSE exclude_libraw_LIB_SRCS CONFIGURE_DEPENDS "${LIBRAW_PATH}/src/*_ph.cpp")
|
||||
list(REMOVE_ITEM libraw_LIB_SRCS ${exclude_libraw_LIB_SRCS})
|
||||
endif()
|
||||
|
||||
if(RAWSPEED_SUPPORT_CAN_BE_COMPILED)
|
||||
set(libraw_LIB_SRCS ${libraw_LIB_SRCS} ${librawspeed_LIB_SRCS})
|
||||
endif()
|
||||
|
||||
|
||||
add_library(raw ${libraw_LIB_SRCS})
|
||||
add_library(libraw::libraw ALIAS raw)
|
||||
target_compile_definitions(raw PRIVATE LIBRAW_NOTHREADS)
|
||||
|
||||
# Flag to export library symbols
|
||||
if (WIN32)
|
||||
target_compile_definitions(raw PRIVATE LIBRAW_BUILDLIB)
|
||||
endif()
|
||||
|
||||
# Static builds use LIBRAW_NODLL:
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(raw PUBLIC LIBRAW_NODLL)
|
||||
endif()
|
||||
|
||||
target_include_directories(raw
|
||||
PUBLIC
|
||||
$<INSTALL_INTERFACE:libraw>
|
||||
$<BUILD_INTERFACE:${LIBRAW_PATH}>)
|
||||
|
||||
target_link_libraries(raw PUBLIC ${MATH_LIBRARY})
|
||||
|
||||
if(WIN32)
|
||||
target_link_libraries(raw PUBLIC ws2_32)
|
||||
endif()
|
||||
|
||||
if(OpenMP_FOUND)
|
||||
target_link_libraries(raw PUBLIC OpenMP::OpenMP_CXX)
|
||||
if(MINGW)
|
||||
target_compile_definitions(raw PRIVATE LIBRAW_FORCE_OPENMP)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(LCMS_SUPPORT_CAN_BE_COMPILED)
|
||||
target_link_libraries(raw PUBLIC ${LCMS2_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(ZLIB_FOUND)
|
||||
target_link_libraries(raw PUBLIC ZLIB::ZLIB)
|
||||
endif()
|
||||
|
||||
if(JPEG8_FOUND)
|
||||
target_link_libraries(raw PUBLIC JPEG::JPEG)
|
||||
endif()
|
||||
|
||||
if(JASPER_FOUND)
|
||||
target_link_libraries(raw PUBLIC ${JASPER_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(RAWSPEED_SUPPORT_CAN_BE_COMPILED)
|
||||
target_link_libraries(raw PUBLIC ${LIBXML2_LIBRARIES})
|
||||
endif()
|
||||
|
||||
set_target_properties(raw PROPERTIES VERSION ${RAW_LIB_SO_VERSION_STRING})
|
||||
set_target_properties(raw PROPERTIES SOVERSION ${RAW_LIB_SO_CUR_VERSION})
|
||||
set_target_properties(raw PROPERTIES OUTPUT_NAME "raw")
|
||||
set_target_properties(raw PROPERTIES COMPILE_PDB_NAME "raw")
|
||||
|
||||
# -- Dedicated libraw target to support multi-threading ---------------------------------------------
|
||||
|
||||
set(libraw_r_LIB_SRCS ${libraw_LIB_SRCS})
|
||||
|
||||
add_library(raw_r ${libraw_r_LIB_SRCS})
|
||||
add_library(libraw::libraw_r ALIAS raw_r)
|
||||
|
||||
# Flag to export library symbols
|
||||
if(WIN32)
|
||||
target_compile_definitions(raw_r PRIVATE LIBRAW_BUILDLIB)
|
||||
endif()
|
||||
|
||||
# Static builds use LIBRAW_NODLL:
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(raw_r PUBLIC LIBRAW_NODLL)
|
||||
endif()
|
||||
|
||||
# Always build position-independent code (PIC), even when building Libraw as a
|
||||
# static library so that shared libraries can link against it, not just
|
||||
# executables (PIC does not apply on Windows).
|
||||
# Use set_target_properties() not append_target_property() here as
|
||||
# POSITION_INDEPENDENT_CODE is a binary ON/OFF switch.
|
||||
set_target_properties(raw PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
set_target_properties(raw_r PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
target_link_libraries(raw_r PUBLIC ${MATH_LIBRARY})
|
||||
target_include_directories(raw_r
|
||||
PUBLIC
|
||||
$<INSTALL_INTERFACE:libraw>
|
||||
$<BUILD_INTERFACE:${LIBRAW_PATH}>)
|
||||
|
||||
if(WIN32)
|
||||
target_link_libraries(raw_r PUBLIC ws2_32)
|
||||
endif()
|
||||
|
||||
if(OpenMP_FOUND)
|
||||
target_link_libraries(raw_r PUBLIC OpenMP::OpenMP_CXX)
|
||||
if(MINGW)
|
||||
target_compile_definitions(raw_r PRIVATE LIBRAW_FORCE_OPENMP)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(LCMS_SUPPORT_CAN_BE_COMPILED)
|
||||
target_link_libraries(raw_r PUBLIC ${LCMS2_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(ZLIB_FOUND)
|
||||
target_link_libraries(raw_r PUBLIC ZLIB::ZLIB)
|
||||
endif()
|
||||
|
||||
if(JPEG8_FOUND)
|
||||
target_link_libraries(raw_r PUBLIC JPEG::JPEG)
|
||||
endif()
|
||||
|
||||
if(JASPER_FOUND)
|
||||
target_link_libraries(raw_r PUBLIC ${JASPER_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(RAWSPEED_SUPPORT_CAN_BE_COMPILED)
|
||||
target_link_libraries(raw_r PUBLIC ${LIBXML2_LIBRARIES} Threads::Threads)
|
||||
endif()
|
||||
|
||||
set_target_properties(raw_r PROPERTIES VERSION ${RAW_LIB_SO_VERSION_STRING})
|
||||
set_target_properties(raw_r PROPERTIES SOVERSION ${RAW_LIB_SO_CUR_VERSION})
|
||||
set_target_properties(raw_r PROPERTIES OUTPUT_NAME "raw_r")
|
||||
set_target_properties(raw_r PROPERTIES COMPILE_PDB_NAME "raw_r")
|
||||
|
||||
# -- Files to install -------------------------------------------------------------------------------------
|
||||
if (LIBRAW_INSTALL)
|
||||
# Configure and install data file for packaging.
|
||||
include(GNUInstallDirs)
|
||||
|
||||
if(NOT MSVC)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/data/libraw.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libraw.pc @ONLY)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libraw.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/data/libraw_r.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libraw_r.pc @ONLY)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libraw_r.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/data/libraw.lsm.cmake ${CMAKE_CURRENT_BINARY_DIR}/libraw.lsm)
|
||||
endif()
|
||||
|
||||
# Install Shared header files.
|
||||
install(FILES ${LIBRAW_PATH}/libraw/libraw.h
|
||||
${LIBRAW_PATH}/libraw/libraw_alloc.h
|
||||
${LIBRAW_PATH}/libraw/libraw_const.h
|
||||
${LIBRAW_PATH}/libraw/libraw_datastream.h
|
||||
${LIBRAW_PATH}/libraw/libraw_internal.h
|
||||
${LIBRAW_PATH}/libraw/libraw_types.h
|
||||
${LIBRAW_PATH}/libraw/libraw_version.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libraw_config.h
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libraw
|
||||
COMPONENT Devel
|
||||
)
|
||||
|
||||
# Install Shared binary files.
|
||||
install(TARGETS raw raw_r
|
||||
EXPORT ${PROJECT_NAME}Targets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
)
|
||||
|
||||
|
||||
if(NOT BUILD_SHARED_LIBS AND "${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC")
|
||||
message("ClangCl does not support pdb generation with static libraries")
|
||||
elseif(MSVC)
|
||||
install(FILES ${PROJECT_BINARY_DIR}/raw.pdb ${PROJECT_BINARY_DIR}/raw_r.pdb
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
CONFIGURATIONS Debug RelWithDebInfo
|
||||
)
|
||||
endif()
|
||||
|
||||
# Install find cmake script to the system for client applications.
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/FindLibRaw.cmake
|
||||
DESTINATION ${CMAKE_INSTALL_DATADIR}/cmake/libraw)
|
||||
|
||||
# Install doc data files.
|
||||
if(NOT MSVC)
|
||||
install(FILES ${LIBRAW_PATH}/COPYRIGHT
|
||||
${LIBRAW_PATH}/LICENSE.CDDL
|
||||
${LIBRAW_PATH}/LICENSE.LGPL
|
||||
${LIBRAW_PATH}/Changelog.txt
|
||||
DESTINATION ${CMAKE_INSTALL_DOCDIR}
|
||||
COMPONENT main
|
||||
)
|
||||
endif()
|
||||
|
||||
# Uninstall rules
|
||||
if(LIBRAW_UNINSTALL_TARGET)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/Uninstall.cmake ${CMAKE_BINARY_DIR}/cmake_uninstall.cmake COPYONLY)
|
||||
add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake")
|
||||
endif()
|
||||
|
||||
# Export the package for use from the build tree
|
||||
export(TARGETS raw raw_r
|
||||
NAMESPACE libraw:: FILE cmake/${PROJECT_NAME}Targets.cmake)
|
||||
export(PACKAGE ${PROJECT_NAME})
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
write_basic_package_version_file(
|
||||
cmake/${PROJECT_NAME}ConfigVersion.cmake
|
||||
VERSION ${PROJECT_VERSION}
|
||||
COMPATIBILITY AnyNewerVersion)
|
||||
|
||||
configure_package_config_file(
|
||||
cmake/${PROJECT_NAME}Config.cmake.in
|
||||
cmake/${PROJECT_NAME}Config.cmake
|
||||
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/)
|
||||
|
||||
install(FILES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/cmake/${PROJECT_NAME}Config.cmake
|
||||
${CMAKE_CURRENT_BINARY_DIR}/cmake/${PROJECT_NAME}ConfigVersion.cmake
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/)
|
||||
|
||||
install(EXPORT ${PROJECT_NAME}Targets
|
||||
NAMESPACE libraw:: DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/)
|
||||
endif(LIBRAW_INSTALL)
|
||||
|
||||
# -- Compile LibRaw Examples --------------------------------------------------------------------------------
|
||||
|
||||
# add a small macro so that this is a bit cleaner
|
||||
macro(LIBRAW_BUILD_SAMPLES)
|
||||
set(_filename ${ARGV0})
|
||||
set(_rawlib ${ARGV1})
|
||||
string(REPLACE "." ";" _temp ${_filename})
|
||||
list(GET _temp 0 _target)
|
||||
|
||||
set(${_target}_SRCS ${LIBRAW_PATH}/samples/${_filename})
|
||||
|
||||
add_executable(${_target} ${${_target}_SRCS})
|
||||
target_compile_options(${_target} PRIVATE -w)
|
||||
|
||||
target_link_libraries(${_target} PRIVATE ${_rawlib})
|
||||
|
||||
if(${_rawlib} MATCHES "raw_r")
|
||||
target_link_libraries(${_target} PUBLIC ${PTHREADS_LIBRARY})
|
||||
endif()
|
||||
|
||||
install(TARGETS ${_target}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
)
|
||||
endmacro(LIBRAW_BUILD_SAMPLES)
|
||||
|
||||
if(ENABLE_EXAMPLES)
|
||||
LIBRAW_BUILD_SAMPLES(simple_dcraw.cpp raw)
|
||||
|
||||
if(EXISTS mem_image.cpp)
|
||||
LIBRAW_BUILD_SAMPLES(mem_image.cpp raw)
|
||||
else()
|
||||
LIBRAW_BUILD_SAMPLES(mem_image_sample.cpp raw)
|
||||
endif()
|
||||
|
||||
LIBRAW_BUILD_SAMPLES(dcraw_emu.cpp raw)
|
||||
LIBRAW_BUILD_SAMPLES(4channels.cpp raw)
|
||||
LIBRAW_BUILD_SAMPLES(unprocessed_raw.cpp raw)
|
||||
LIBRAW_BUILD_SAMPLES(raw-identify.cpp raw)
|
||||
LIBRAW_BUILD_SAMPLES(multirender_test.cpp raw)
|
||||
LIBRAW_BUILD_SAMPLES(postprocessing_benchmark.cpp raw)
|
||||
|
||||
if(TARGET Threads::Threads)
|
||||
if(MSVC)
|
||||
LIBRAW_BUILD_SAMPLES(half_mt_win32.c raw_r)
|
||||
else()
|
||||
LIBRAW_BUILD_SAMPLES(dcraw_half.c raw_r)
|
||||
LIBRAW_BUILD_SAMPLES(half_mt.c raw_r)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
62
libraw/src/main/cpp/LibRaw-cmake/INSTALL.CMAKE
Normal file
@ -0,0 +1,62 @@
|
||||
|
||||
========= Installing LibRaw (CMake version) ==========
|
||||
|
||||
I. Installation steps
|
||||
|
||||
1. Unpack the distribution file:
|
||||
|
||||
$ tar xzvf LibRaw-0.xx.yy.tar.gz
|
||||
|
||||
2. Copy this LibRaw-cmake scripts in LibRaw-... folder
|
||||
|
||||
3. Go to LibRaw folder and run ./configure and make:
|
||||
|
||||
$ cd LibRaw-0.xx.yy
|
||||
$ ./cmake [...optional args...] .
|
||||
$ make
|
||||
|
||||
4. install by run make install as root:
|
||||
|
||||
$ sudo make install
|
||||
|
||||
|
||||
II. ./cmake options
|
||||
|
||||
-DENABLE_OPENMP=ON/OFF
|
||||
|
||||
Enable/disable OpenMP support if compiler supports it.
|
||||
OpenMP is enabled by default.
|
||||
|
||||
|
||||
-DENABLE_LCMS=ON/OFF
|
||||
|
||||
Enable/disable LCMS color engine support. If enabled, ./cmake will try to
|
||||
find lcms library. Both LCMS-1.x and LCMS-2.x are supported
|
||||
LCMS support is enabled by default
|
||||
|
||||
|
||||
-DENABLE_EXAMPLES=ON/OFF
|
||||
|
||||
Enables/disables examples compilation and installation. Enabled by default
|
||||
|
||||
|
||||
-DENABLE_RAWSPEED=ON/OFF
|
||||
-DRAWSPEED_RPATH=FOLDERNAME
|
||||
|
||||
Enables/disables support of additional code from RawStudio project
|
||||
You need to download RawSpeed source code to use this feature.
|
||||
See README.RawSpeed.txt for details.
|
||||
./cmake will try to find RawSpeed code in:
|
||||
|
||||
a) If folder is specified via -DRAWSPEED_RPATH=FOLDERNAME
|
||||
command-line option, then only this folder will be checked.
|
||||
|
||||
b) If no folder is specified in -DENABLE_RAWSPEED switch:
|
||||
|
||||
./RawSpeed (in LibRaw folder)
|
||||
|
||||
|
||||
|
||||
-DENABLE_DCRAW_DEBUG=ON/OFF
|
||||
|
||||
Enables/disables support of additional debug traces from dcraw operations. Disabled by default
|
22
libraw/src/main/cpp/LibRaw-cmake/LICENSE
Normal file
@ -0,0 +1,22 @@
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
1. Redistributions of source code must retain the copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. The name of the author may not be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
35
libraw/src/main/cpp/LibRaw-cmake/README.md
Normal file
@ -0,0 +1,35 @@
|
||||
LibRaw-cmake
|
||||
============
|
||||
|
||||
[](https://travis-ci.org/LibRaw/LibRaw-cmake)
|
||||
|
||||
This is a separate repository for LibRaw CMake support scripts.
|
||||
It is [unmaintained](https://github.com/LibRaw/LibRaw/issues/44#issuecomment-60344793) by the authors of LibRaw and relies solely on user contributions.
|
||||
The current community-maintainer of this repository is [Maik Riechert](https://github.com/neothemachine).
|
||||
|
||||
If you wish to contribute to it, please open an issue or submit a pull request in this repository. Do *not* submit issues or pull requests regarding CMake to the main [LibRaw repository](https://github.com/LibRaw/LibRaw). Also, try to keep CMake related discussions out of the [main forum](http://www.libraw.org/forum), instead use the issues for that.
|
||||
|
||||
If you like to become a direct contributor with write permissions to this repository, please contact the [LibRaw authors](https://github.com/LibRaw).
|
||||
|
||||
How to use
|
||||
----------
|
||||
Just copy the contents of this repository into the root LibRaw folder and run cmake as usual.
|
||||
|
||||
### Add as a submodule
|
||||
|
||||
Add this repo and libraw as git submodules:
|
||||
|
||||
`git submodule add https://github.com/LibRaw/LibRaw-cmake.git`
|
||||
|
||||
`git submodule add https://github.com/LibRaw/LibRaw.git`
|
||||
|
||||
In your CMakeLists.txt add
|
||||
|
||||
```cmake
|
||||
add_subdirectory(LibRaw-cmake)
|
||||
target_link_libraries(ProjectName PRIVATE libraw::libraw)
|
||||
```
|
||||
|
||||
Set the `LIBRAW_PATH` CMake variable to point to the **LibRaw** directory:
|
||||
|
||||
`cmake -DLIBRAW_PATH=./LibRaw/`
|
13
libraw/src/main/cpp/LibRaw-cmake/cmake/data/libraw.lsm.cmake
Normal file
@ -0,0 +1,13 @@
|
||||
Begin4
|
||||
Title: ${PROJECT_NAME}
|
||||
Version: ${RAW_LIB_VERSION_STRING}
|
||||
Entered-date: 2013-09-08
|
||||
Description: Raw image decoder library
|
||||
Keywords: Raw image digital camera demosaicing decoding
|
||||
Author: Copyright 2008-2013 LibRaw LLC (info@libraw.org)
|
||||
Maintained-by:
|
||||
Primary-site: http://www.libraw.org
|
||||
Original-site:
|
||||
Platforms: Linux and other Unices, MacOs-X, Win32
|
||||
Copying-policy: GPL
|
||||
End
|
12
libraw/src/main/cpp/LibRaw-cmake/cmake/data/libraw.pc.cmake
Normal file
@ -0,0 +1,12 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
|
||||
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
|
||||
|
||||
Name: @PROJECT_NAME@
|
||||
Description: Raw image decoder library (non-thread-safe)
|
||||
URL: http://www.libraw.org
|
||||
Requires:
|
||||
Version: @RAW_LIB_VERSION_STRING@
|
||||
Libs: -L${libdir} -lraw
|
||||
Cflags: -I${includedir} -I${includedir}/libraw
|
@ -0,0 +1,50 @@
|
||||
/* -*- C++ -*-
|
||||
* File: libraw_version.h
|
||||
* Copyright 2008-2013 LibRaw LLC (info@libraw.org)
|
||||
* Created: Mon Sept 8, 2008
|
||||
*
|
||||
* LibRaw C++ interface
|
||||
*
|
||||
|
||||
LibRaw is free software; you can redistribute it and/or modify
|
||||
it under the terms of the one of two licenses as you choose:
|
||||
|
||||
1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1
|
||||
(See the file LICENSE.LGPL provided in LibRaw distribution archive for details).
|
||||
|
||||
2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
|
||||
(See the file LICENSE.CDDL provided in LibRaw distribution archive for details).
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __LIBRAW_CONFIG_H
|
||||
#define __LIBRAW_CONFIG_H
|
||||
|
||||
/* Define to 1 if LibRaw have been compiled with DNG deflate codec support */
|
||||
#cmakedefine LIBRAW_USE_DNGDEFLATECODEC 1
|
||||
|
||||
/* Define to 1 if LibRaw have been compiled with DNG lossy codec support */
|
||||
#cmakedefine LIBRAW_USE_DNGLOSSYCODEC 1
|
||||
|
||||
/* Define to 1 if LibRaw have been compiled with OpenMP support */
|
||||
#cmakedefine LIBRAW_USE_OPENMP 1
|
||||
|
||||
/* Define to 1 if LibRaw have been compiled with LCMS support */
|
||||
#cmakedefine LIBRAW_USE_LCMS 1
|
||||
|
||||
/* Define to 1 if LibRaw have been compiled with RedCine codec support */
|
||||
#cmakedefine LIBRAW_USE_REDCINECODEC 1
|
||||
|
||||
/* Define to 1 if LibRaw have been compiled with RawSpeed codec support */
|
||||
#cmakedefine LIBRAW_USE_RAWSPEED 1
|
||||
|
||||
/* Define to 1 if LibRaw have been compiled with debug message from dcraw */
|
||||
#cmakedefine LIBRAW_USE_DCRAW_DEBUG 1
|
||||
|
||||
/* Define to 1 if LibRaw have been compiled with Foveon X3F support */
|
||||
#cmakedefine LIBRAW_USE_X3FTOOLS 1
|
||||
|
||||
/* Define to 1 if LibRaw have been compiled with Raspberry Pi RAW support */
|
||||
#cmakedefine LIBRAW_USE_6BY9RPI 1
|
||||
|
||||
#endif
|
@ -0,0 +1,12 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
|
||||
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
|
||||
|
||||
Name: @PROJECT_NAME@
|
||||
Description: Raw image decoder library (thread-safe)
|
||||
URL: http://www.libraw.org
|
||||
Requires:
|
||||
Version: @RAW_LIB_VERSION_STRING@
|
||||
Libs: -L${libdir} -lraw_r
|
||||
Cflags: -I${includedir} -I${includedir}/libraw
|
35
libraw/src/main/cpp/LibRaw-cmake/cmake/librawConfig.cmake.in
Normal file
@ -0,0 +1,35 @@
|
||||
include(CMakeFindDependencyMacro)
|
||||
|
||||
if(@JASPER_FOUND@)
|
||||
find_dependency(Jasper)
|
||||
endif()
|
||||
|
||||
if(@JPEG_FOUND@)
|
||||
find_dependency(JPEG)
|
||||
endif()
|
||||
if(@ZLIB_FOUND@)
|
||||
find_dependency(ZLIB)
|
||||
endif()
|
||||
|
||||
if(@LCMS_SUPPORT_CAN_BE_COMPILED@)
|
||||
if(@LCMS2_FOUND@)
|
||||
find_dependency(LCMS2)
|
||||
elseif(@LCMS_FOUND@)
|
||||
find_dependency(LCMS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(@ENABLE_RAWSPEED@)
|
||||
find_dependency(LibXml2)
|
||||
find_dependency(Threads)
|
||||
endif()
|
||||
|
||||
if(@ENABLE_OPENMP@)
|
||||
find_dependency(OpenMP)
|
||||
endif()
|
||||
|
||||
|
||||
@PACKAGE_INIT@
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
|
||||
check_required_components("@PROJECT_NAME@")
|
@ -0,0 +1,60 @@
|
||||
# - Find LCMS
|
||||
# Find the LCMS (Little Color Management System) library and includes and
|
||||
# This module defines
|
||||
# LCMS_INCLUDE_DIR, where to find lcms.h
|
||||
# LCMS_LIBRARIES, the libraries needed to use LCMS.
|
||||
# LCMS_DOT_VERSION, The version number of the LCMS library, e.g. "1.19"
|
||||
# LCMS_VERSION, Similar to LCMS_DOT_VERSION, but without the dots, e.g. "119"
|
||||
# LCMS_FOUND, If false, do not try to use LCMS.
|
||||
#
|
||||
# The minimum required version of LCMS can be specified using the
|
||||
# standard syntax, e.g. find_package(LCMS 1.10)
|
||||
|
||||
# Copyright (c) 2008, Adrian Page, <adrian@pagenet.plus.com>
|
||||
# Copyright (c) 2009, Cyrille Berger, <cberger@cberger.net>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying LICENSE file.
|
||||
|
||||
|
||||
# use pkg-config to get the directories and then use these values
|
||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||
if(NOT WIN32)
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(PC_LCMS lcms)
|
||||
set(LCMS_DEFINITIONS ${PC_LCMS_CFLAGS_OTHER})
|
||||
endif(NOT WIN32)
|
||||
|
||||
find_path(LCMS_INCLUDE_DIR lcms.h
|
||||
HINTS
|
||||
${PC_LCMS_INCLUDEDIR}
|
||||
${PC_LCMS_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES lcms liblcms1
|
||||
)
|
||||
|
||||
find_library(LCMS_LIBRARIES NAMES lcms liblcms lcms-1 liblcms-1
|
||||
HINTS
|
||||
${PC_LCMS_LIBDIR}
|
||||
${PC_LCMS_LIBRARY_DIRS}
|
||||
PATH_SUFFIXES lcms
|
||||
)
|
||||
|
||||
# Store the LCMS version number in the cache, so we don't have to search every time again
|
||||
if(LCMS_INCLUDE_DIR AND NOT LCMS_VERSION)
|
||||
file(READ ${LCMS_INCLUDE_DIR}/lcms.h LCMS_VERSION_CONTENT)
|
||||
string(REGEX MATCH "#define LCMS_VERSION[ ]*[0-9]*\n" LCMS_VERSION_MATCH ${LCMS_VERSION_CONTENT})
|
||||
if(LCMS_VERSION_MATCH)
|
||||
string(REGEX REPLACE "#define LCMS_VERSION[ ]*([0-9]*)\n" "\\1" _LCMS_VERSION ${LCMS_VERSION_MATCH})
|
||||
string(SUBSTRING ${_LCMS_VERSION} 0 1 LCMS_MAJOR_VERSION)
|
||||
string(SUBSTRING ${_LCMS_VERSION} 1 2 LCMS_MINOR_VERSION)
|
||||
endif(LCMS_VERSION_MATCH)
|
||||
set(LCMS_VERSION "${LCMS_MAJOR_VERSION}${LCMS_MINOR_VERSION}" CACHE STRING "Version number of lcms" FORCE)
|
||||
set(LCMS_DOT_VERSION "${LCMS_MAJOR_VERSION}.${LCMS_MINOR_VERSION}" CACHE STRING "Version number of lcms split into components" FORCE)
|
||||
endif(LCMS_INCLUDE_DIR AND NOT LCMS_VERSION)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LCMS REQUIRED_VARS LCMS_LIBRARIES LCMS_INCLUDE_DIR
|
||||
VERSION_VAR LCMS_DOT_VERSION )
|
||||
|
||||
mark_as_advanced(LCMS_INCLUDE_DIR LCMS_LIBRARIES LCMS_VERSION)
|
||||
|
@ -0,0 +1,72 @@
|
||||
# - Find LCMS2
|
||||
# Find the LCMS2 includes and library
|
||||
# This module defines
|
||||
# LCMS2_INCLUDE_DIR, where to find lcms.h
|
||||
# LCMS2_LIBRARIES, the libraries needed to use LCMS2.
|
||||
# LCMS2_VERSION, The value of LCMS_VERSION defined in lcms.h
|
||||
# LCMS2_FOUND, If false, do not try to use LCMS2.
|
||||
|
||||
|
||||
# Copyright (c) 2008, Adrian Page, <adrian@pagenet.plus.com>
|
||||
# Copyright (c) 2009, Cyrille Berger, <cberger@cberger.net>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying LICENSE file.
|
||||
|
||||
|
||||
# use pkg-config to get the directories and then use these values
|
||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||
if(NOT WIN32)
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(PC_LCMS2 lcms2)
|
||||
set(LCMS2_DEFINITIONS ${PC_LCMS2_CFLAGS_OTHER})
|
||||
endif(NOT WIN32)
|
||||
|
||||
find_path(LCMS2_INCLUDE_DIR lcms2.h
|
||||
PATHS
|
||||
${PC_LCMS2_INCLUDEDIR}
|
||||
${PC_LCMS2_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES lcms2 liblcms2
|
||||
)
|
||||
|
||||
find_library(LCMS2_LIBRARIES NAMES lcms2 liblcms2 lcms-2 liblcms-2
|
||||
PATHS
|
||||
${PC_LCMS2_LIBDIR}
|
||||
${PC_LCMS2_LIBRARY_DIRS}
|
||||
PATH_SUFFIXES lcms2
|
||||
)
|
||||
|
||||
if(LCMS2_INCLUDE_DIR AND LCMS2_LIBRARIES)
|
||||
set(LCMS2_FOUND TRUE)
|
||||
else(LCMS2_INCLUDE_DIR AND LCMS2_LIBRARIES)
|
||||
set(LCMS2_FOUND FALSE)
|
||||
endif(LCMS2_INCLUDE_DIR AND LCMS2_LIBRARIES)
|
||||
|
||||
if(LCMS2_FOUND)
|
||||
file(READ ${LCMS2_INCLUDE_DIR}/lcms2.h LCMS2_VERSION_CONTENT)
|
||||
string(REGEX MATCH "#define LCMS_VERSION[ ]*[0-9]*\n" LCMS2_VERSION_MATCH ${LCMS2_VERSION_CONTENT})
|
||||
if(LCMS2_VERSION_MATCH)
|
||||
string(REGEX REPLACE "#define LCMS_VERSION[ ]*([0-9]*)\n" "\\1" LCMS2_VERSION ${LCMS2_VERSION_MATCH})
|
||||
if(NOT LCMS2_FIND_QUIETLY)
|
||||
string(SUBSTRING ${LCMS2_VERSION} 0 1 LCMS2_MAJOR_VERSION)
|
||||
string(SUBSTRING ${LCMS2_VERSION} 1 2 LCMS2_MINOR_VERSION)
|
||||
message(STATUS "Found lcms version ${LCMS2_MAJOR_VERSION}.${LCMS2_MINOR_VERSION}, ${LCMS2_LIBRARIES}")
|
||||
endif(NOT LCMS2_FIND_QUIETLY)
|
||||
else(LCMS2_VERSION_MATCH)
|
||||
if(NOT LCMS2_FIND_QUIETLY)
|
||||
message(STATUS "Found lcms2 but failed to find version ${LCMS2_LIBRARIES}")
|
||||
endif(NOT LCMS2_FIND_QUIETLY)
|
||||
set(LCMS2_VERSION NOTFOUND)
|
||||
endif(LCMS2_VERSION_MATCH)
|
||||
else(LCMS2_FOUND)
|
||||
if(NOT LCMS2_FIND_QUIETLY)
|
||||
if(LCMS2_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Required package lcms2 NOT found")
|
||||
else(LCMS2_FIND_REQUIRED)
|
||||
message(STATUS "lcms2 NOT found")
|
||||
endif(LCMS2_FIND_REQUIRED)
|
||||
endif(NOT LCMS2_FIND_QUIETLY)
|
||||
endif(LCMS2_FOUND)
|
||||
|
||||
mark_as_advanced(LCMS2_INCLUDE_DIR LCMS2_LIBRARIES LCMS2_VERSION)
|
||||
|
@ -0,0 +1,96 @@
|
||||
# - Find LibRaw
|
||||
# Find the LibRaw library <http://www.libraw.org>
|
||||
# This module defines
|
||||
# LibRaw_VERSION_STRING, the version string of LibRaw
|
||||
# LibRaw_INCLUDE_DIR, where to find libraw.h
|
||||
# LibRaw_LIBRARIES, the libraries needed to use LibRaw (non-thread-safe)
|
||||
# LibRaw_r_LIBRARIES, the libraries needed to use LibRaw (thread-safe)
|
||||
# LibRaw_DEFINITIONS, the definitions needed to use LibRaw (non-thread-safe)
|
||||
# LibRaw_r_DEFINITIONS, the definitions needed to use LibRaw (thread-safe)
|
||||
#
|
||||
# Copyright (c) 2013, Pino Toscano <pino at kde dot org>
|
||||
# Copyright (c) 2013, Gilles Caulier <caulier dot gilles at gmail dot com>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying LICENSE file.
|
||||
|
||||
FIND_PACKAGE(PkgConfig)
|
||||
|
||||
IF(PKG_CONFIG_FOUND)
|
||||
PKG_CHECK_MODULES(PC_LIBRAW libraw)
|
||||
SET(LibRaw_DEFINITIONS ${PC_LIBRAW_CFLAGS_OTHER})
|
||||
|
||||
PKG_CHECK_MODULES(PC_LIBRAW_R libraw_r)
|
||||
SET(LibRaw_r_DEFINITIONS ${PC_LIBRAW_R_CFLAGS_OTHER})
|
||||
ENDIF()
|
||||
|
||||
FIND_PATH(LibRaw_INCLUDE_DIR libraw.h
|
||||
HINTS
|
||||
${PC_LIBRAW_INCLUDEDIR}
|
||||
${PC_LibRaw_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES libraw
|
||||
)
|
||||
|
||||
FIND_LIBRARY(LibRaw_LIBRARY_RELEASE NAMES raw
|
||||
HINTS
|
||||
${PC_LIBRAW_LIBDIR}
|
||||
${PC_LIBRAW_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
FIND_LIBRARY(LibRaw_LIBRARY_DEBUG NAMES rawd
|
||||
HINTS
|
||||
${PC_LIBRAW_LIBDIR}
|
||||
${PC_LIBRAW_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
select_library_configurations(LibRaw)
|
||||
|
||||
FIND_LIBRARY(LibRaw_r_LIBRARY_RELEASE NAMES raw_r
|
||||
HINTS
|
||||
${PC_LIBRAW_R_LIBDIR}
|
||||
${PC_LIBRAW_R_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
FIND_LIBRARY(LibRaw_r_LIBRARY_DEBUG NAMES raw_rd
|
||||
HINTS
|
||||
${PC_LIBRAW_R_LIBDIR}
|
||||
${PC_LIBRAW_R_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
select_library_configurations(LibRaw_r)
|
||||
|
||||
IF(LibRaw_INCLUDE_DIR)
|
||||
FILE(READ ${LibRaw_INCLUDE_DIR}/libraw_version.h _libraw_version_content)
|
||||
|
||||
STRING(REGEX MATCH "#define LIBRAW_MAJOR_VERSION[ \t]*([0-9]*)\n" _version_major_match ${_libraw_version_content})
|
||||
SET(_libraw_version_major "${CMAKE_MATCH_1}")
|
||||
|
||||
STRING(REGEX MATCH "#define LIBRAW_MINOR_VERSION[ \t]*([0-9]*)\n" _version_minor_match ${_libraw_version_content})
|
||||
SET(_libraw_version_minor "${CMAKE_MATCH_1}")
|
||||
|
||||
STRING(REGEX MATCH "#define LIBRAW_PATCH_VERSION[ \t]*([0-9]*)\n" _version_patch_match ${_libraw_version_content})
|
||||
SET(_libraw_version_patch "${CMAKE_MATCH_1}")
|
||||
|
||||
IF(_version_major_match AND _version_minor_match AND _version_patch_match)
|
||||
SET(LibRaw_VERSION_STRING "${_libraw_version_major}.${_libraw_version_minor}.${_libraw_version_patch}")
|
||||
ELSE()
|
||||
IF(NOT LibRaw_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Failed to get version information from ${LibRaw_INCLUDE_DIR}/libraw_version.h")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibRaw
|
||||
REQUIRED_VARS LibRaw_LIBRARIES LibRaw_INCLUDE_DIR
|
||||
VERSION_VAR LibRaw_VERSION_STRING
|
||||
)
|
||||
|
||||
MARK_AS_ADVANCED(LibRaw_VERSION_STRING
|
||||
LibRaw_INCLUDE_DIR
|
||||
LibRaw_LIBRARIES
|
||||
LibRaw_r_LIBRARIES
|
||||
LibRaw_DEFINITIONS
|
||||
LibRaw_r_DEFINITIONS
|
||||
)
|
@ -0,0 +1,20 @@
|
||||
# MACRO_BOOL_TO_01( VAR RESULT0 ... RESULTN )
|
||||
# This macro evaluates its first argument
|
||||
# and sets all the given vaiables either to 0 or 1
|
||||
# depending on the value of the first one
|
||||
|
||||
# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying LICENSE file.
|
||||
|
||||
|
||||
MACRO(MACRO_BOOL_TO_01 FOUND_VAR )
|
||||
FOREACH (_current_VAR ${ARGN})
|
||||
IF(${FOUND_VAR})
|
||||
SET(${_current_VAR} 1)
|
||||
ELSE(${FOUND_VAR})
|
||||
SET(${_current_VAR} 0)
|
||||
ENDIF(${FOUND_VAR})
|
||||
ENDFOREACH(_current_VAR)
|
||||
ENDMACRO(MACRO_BOOL_TO_01)
|
@ -0,0 +1,159 @@
|
||||
# This file defines the Feature Logging macros.
|
||||
#
|
||||
# MACRO_LOG_FEATURE(VAR FEATURE DESCRIPTION URL [REQUIRED [MIN_VERSION [COMMENTS]]])
|
||||
# Logs the information so that it can be displayed at the end
|
||||
# of the configure run
|
||||
# VAR : TRUE or FALSE, indicating whether the feature is supported
|
||||
# FEATURE: name of the feature, e.g. "libjpeg"
|
||||
# DESCRIPTION: description what this feature provides
|
||||
# URL: home page
|
||||
# REQUIRED: TRUE or FALSE, indicating whether the feature is required
|
||||
# MIN_VERSION: minimum version number. empty string if unneeded
|
||||
# COMMENTS: More info you may want to provide. empty string if unnecessary
|
||||
#
|
||||
# MACRO_DISPLAY_FEATURE_LOG()
|
||||
# Call this to display the collected results.
|
||||
# Exits CMake with a FATAL error message if a required feature is missing
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# INCLUDE(MacroLogFeature)
|
||||
#
|
||||
# FIND_PACKAGE(JPEG)
|
||||
# MACRO_LOG_FEATURE(JPEG_FOUND "libjpeg" "Support JPEG images" "http://www.ijg.org" TRUE "3.2a" "")
|
||||
# ...
|
||||
# MACRO_DISPLAY_FEATURE_LOG()
|
||||
|
||||
# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
|
||||
# Copyright (c) 2006, Allen Winter, <winter@kde.org>
|
||||
# Copyright (c) 2009, Sebastian Trueg, <trueg@kde.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying LICENSE file.
|
||||
|
||||
IF (NOT _macroLogFeatureAlreadyIncluded)
|
||||
SET(_file ${CMAKE_BINARY_DIR}/MissingRequirements.txt)
|
||||
IF (EXISTS ${_file})
|
||||
FILE(REMOVE ${_file})
|
||||
ENDIF (EXISTS ${_file})
|
||||
|
||||
SET(_file ${CMAKE_BINARY_DIR}/EnabledFeatures.txt)
|
||||
IF (EXISTS ${_file})
|
||||
FILE(REMOVE ${_file})
|
||||
ENDIF (EXISTS ${_file})
|
||||
|
||||
SET(_file ${CMAKE_BINARY_DIR}/DisabledFeatures.txt)
|
||||
IF (EXISTS ${_file})
|
||||
FILE(REMOVE ${_file})
|
||||
ENDIF (EXISTS ${_file})
|
||||
|
||||
SET(_macroLogFeatureAlreadyIncluded TRUE)
|
||||
|
||||
INCLUDE(FeatureSummary)
|
||||
|
||||
ENDIF (NOT _macroLogFeatureAlreadyIncluded)
|
||||
|
||||
|
||||
MACRO(MACRO_LOG_FEATURE _var _package _description _url ) # _required _minvers _comments)
|
||||
|
||||
STRING(TOUPPER "${ARGV4}" _required)
|
||||
SET(_minvers "${ARGV5}")
|
||||
SET(_comments "${ARGV6}")
|
||||
|
||||
IF (${_var})
|
||||
SET(_LOGFILENAME ${CMAKE_BINARY_DIR}/EnabledFeatures.txt)
|
||||
ELSE (${_var})
|
||||
IF ("${_required}" STREQUAL "TRUE")
|
||||
SET(_LOGFILENAME ${CMAKE_BINARY_DIR}/MissingRequirements.txt)
|
||||
ELSE ("${_required}" STREQUAL "TRUE")
|
||||
SET(_LOGFILENAME ${CMAKE_BINARY_DIR}/DisabledFeatures.txt)
|
||||
ENDIF ("${_required}" STREQUAL "TRUE")
|
||||
ENDIF (${_var})
|
||||
|
||||
SET(_logtext " * ${_package}")
|
||||
|
||||
IF (NOT ${_var})
|
||||
IF (${_minvers} MATCHES ".*")
|
||||
SET(_logtext "${_logtext} (${_minvers} or higher)")
|
||||
ENDIF (${_minvers} MATCHES ".*")
|
||||
SET(_logtext "${_logtext} <${_url}>\n ")
|
||||
ELSE (NOT ${_var})
|
||||
SET(_logtext "${_logtext} - ")
|
||||
ENDIF (NOT ${_var})
|
||||
|
||||
SET(_logtext "${_logtext}${_description}")
|
||||
|
||||
IF (NOT ${_var})
|
||||
IF (${_comments} MATCHES ".*")
|
||||
SET(_logtext "${_logtext}\n ${_comments}")
|
||||
ENDIF (${_comments} MATCHES ".*")
|
||||
# SET(_logtext "${_logtext}\n") #double-space missing features?
|
||||
ENDIF (NOT ${_var})
|
||||
|
||||
FILE(APPEND "${_LOGFILENAME}" "${_logtext}\n")
|
||||
|
||||
IF(COMMAND SET_PACKAGE_PROPERTIES)
|
||||
SET_PACKAGE_PROPERTIES("${_package}" PROPERTIES URL "${_url}" DESCRIPTION "\"${_description}\"")
|
||||
ELSEIF(COMMAND SET_PACKAGE_INFO) # in FeatureSummary.cmake since CMake 2.8.3
|
||||
SET_PACKAGE_INFO("${_package}" "\"${_description}\"" "${_url}" "\"${_comments}\"")
|
||||
ENDIF(COMMAND SET_PACKAGE_PROPERTIES)
|
||||
|
||||
ENDMACRO(MACRO_LOG_FEATURE)
|
||||
|
||||
|
||||
MACRO(MACRO_DISPLAY_FEATURE_LOG)
|
||||
IF(COMMAND FEATURE_SUMMARY) # in FeatureSummary.cmake since CMake 2.8.3
|
||||
FEATURE_SUMMARY(FILENAME ${CMAKE_CURRENT_BINARY_DIR}/FindPackageLog.txt
|
||||
WHAT ALL)
|
||||
ENDIF(COMMAND FEATURE_SUMMARY)
|
||||
|
||||
SET(_missingFile ${CMAKE_BINARY_DIR}/MissingRequirements.txt)
|
||||
SET(_enabledFile ${CMAKE_BINARY_DIR}/EnabledFeatures.txt)
|
||||
SET(_disabledFile ${CMAKE_BINARY_DIR}/DisabledFeatures.txt)
|
||||
|
||||
IF (EXISTS ${_missingFile} OR EXISTS ${_enabledFile} OR EXISTS ${_disabledFile})
|
||||
SET(_printSummary TRUE)
|
||||
ENDIF (EXISTS ${_missingFile} OR EXISTS ${_enabledFile} OR EXISTS ${_disabledFile})
|
||||
|
||||
IF(_printSummary)
|
||||
SET(_missingDeps 0)
|
||||
IF (EXISTS ${_enabledFile})
|
||||
FILE(READ ${_enabledFile} _enabled)
|
||||
FILE(REMOVE ${_enabledFile})
|
||||
SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- The following external packages were located on your system.\n-- This installation will have the extra features provided by these packages.\n-----------------------------------------------------------------------------\n${_enabled}")
|
||||
ENDIF (EXISTS ${_enabledFile})
|
||||
|
||||
|
||||
IF (EXISTS ${_disabledFile})
|
||||
SET(_missingDeps 1)
|
||||
FILE(READ ${_disabledFile} _disabled)
|
||||
FILE(REMOVE ${_disabledFile})
|
||||
SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- The following OPTIONAL packages could NOT be located on your system.\n-- Consider installing them to enable more features from this software.\n-----------------------------------------------------------------------------\n${_disabled}")
|
||||
ENDIF (EXISTS ${_disabledFile})
|
||||
|
||||
|
||||
IF (EXISTS ${_missingFile})
|
||||
SET(_missingDeps 1)
|
||||
FILE(READ ${_missingFile} _requirements)
|
||||
SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- The following REQUIRED packages could NOT be located on your system.\n-- You must install these packages before continuing.\n-----------------------------------------------------------------------------\n${_requirements}")
|
||||
FILE(REMOVE ${_missingFile})
|
||||
SET(_haveMissingReq 1)
|
||||
ENDIF (EXISTS ${_missingFile})
|
||||
|
||||
|
||||
IF (NOT ${_missingDeps})
|
||||
SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- Congratulations! All external packages have been found.")
|
||||
ENDIF (NOT ${_missingDeps})
|
||||
|
||||
|
||||
MESSAGE(${_summary})
|
||||
MESSAGE("-----------------------------------------------------------------------------\n")
|
||||
|
||||
|
||||
IF(_haveMissingReq)
|
||||
MESSAGE(FATAL_ERROR "Exiting: Missing Requirements")
|
||||
ENDIF(_haveMissingReq)
|
||||
|
||||
ENDIF(_printSummary)
|
||||
|
||||
ENDMACRO(MACRO_DISPLAY_FEATURE_LOG)
|
@ -0,0 +1,48 @@
|
||||
# - MACRO_OPTIONAL_FIND_PACKAGE() combines FIND_PACKAGE() with an OPTION()
|
||||
# MACRO_OPTIONAL_FIND_PACKAGE( <name> [QUIT] )
|
||||
# This macro is a combination of OPTION() and FIND_PACKAGE(), it
|
||||
# works like FIND_PACKAGE(), but additionally it automatically creates
|
||||
# an option name WITH_<name>, which can be disabled via the cmake GUI.
|
||||
# or via -DWITH_<name>=OFF
|
||||
# The standard <name>_FOUND variables can be used in the same way
|
||||
# as when using the normal FIND_PACKAGE()
|
||||
|
||||
# Copyright (c) 2006-2010 Alexander Neundorf, <neundorf@kde.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying LICENSE file.
|
||||
|
||||
# This is just a helper macro to set a bunch of variables empty.
|
||||
# We don't know whether the package uses UPPERCASENAME or CamelCaseName, so we try both:
|
||||
macro(_MOFP_SET_EMPTY_IF_DEFINED _name _var)
|
||||
if(DEFINED ${_name}_${_var})
|
||||
set(${_name}_${_var} "")
|
||||
endif(DEFINED ${_name}_${_var})
|
||||
|
||||
string(TOUPPER ${_name} _nameUpper)
|
||||
if(DEFINED ${_nameUpper}_${_var})
|
||||
set(${_nameUpper}_${_var} "")
|
||||
endif(DEFINED ${_nameUpper}_${_var})
|
||||
endmacro(_MOFP_SET_EMPTY_IF_DEFINED _package _var)
|
||||
|
||||
|
||||
macro (MACRO_OPTIONAL_FIND_PACKAGE _name )
|
||||
option(WITH_${_name} "Search for ${_name} package" ON)
|
||||
if (WITH_${_name})
|
||||
find_package(${_name} ${ARGN})
|
||||
else (WITH_${_name})
|
||||
string(TOUPPER ${_name} _nameUpper)
|
||||
set(${_name}_FOUND FALSE)
|
||||
set(${_nameUpper}_FOUND FALSE)
|
||||
|
||||
_mofp_set_empty_if_defined(${_name} INCLUDE_DIRS)
|
||||
_mofp_set_empty_if_defined(${_name} INCLUDE_DIR)
|
||||
_mofp_set_empty_if_defined(${_name} INCLUDES)
|
||||
_mofp_set_empty_if_defined(${_name} LIBRARY)
|
||||
_mofp_set_empty_if_defined(${_name} LIBRARIES)
|
||||
_mofp_set_empty_if_defined(${_name} LIBS)
|
||||
_mofp_set_empty_if_defined(${_name} FLAGS)
|
||||
_mofp_set_empty_if_defined(${_name} DEFINITIONS)
|
||||
endif (WITH_${_name})
|
||||
endmacro (MACRO_OPTIONAL_FIND_PACKAGE)
|
||||
|
@ -0,0 +1,22 @@
|
||||
IF(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
|
||||
MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_BINARY_DIR@/install_manifest.txt\"")
|
||||
ENDIF(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
|
||||
|
||||
FILE(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files)
|
||||
STRING(REGEX REPLACE "\n" ";" files "${files}")
|
||||
FOREACH(file ${files})
|
||||
MESSAGE(STATUS "Uninstalling \"${file}\"")
|
||||
IF(EXISTS "${file}")
|
||||
EXEC_PROGRAM(
|
||||
"@CMAKE_COMMAND@" ARGS "-E remove \"${file}\""
|
||||
OUTPUT_VARIABLE rm_out
|
||||
RETURN_VALUE rm_retval
|
||||
)
|
||||
IF("${rm_retval}" STREQUAL 0)
|
||||
ELSE("${rm_retval}" STREQUAL 0)
|
||||
MESSAGE(FATAL_ERROR "Problem when removing \"${file}\"")
|
||||
ENDIF("${rm_retval}" STREQUAL 0)
|
||||
ELSE(EXISTS "${file}")
|
||||
MESSAGE(STATUS "File \"${file}\" does not exist.")
|
||||
ENDIF(EXISTS "${file}")
|
||||
ENDFOREACH(file)
|
4
libraw/src/main/cpp/LibRaw/.clang-format
Normal file
@ -0,0 +1,4 @@
|
||||
BreakBeforeBraces: Allman
|
||||
ColumnLimit: 120
|
||||
SortIncludes: false
|
||||
TabWidth: 4
|
27
libraw/src/main/cpp/LibRaw/COPYRIGHT
Normal file
@ -0,0 +1,27 @@
|
||||
** LibRaw: Raw images processing library **
|
||||
|
||||
Copyright (C) 2008-2021 LibRaw LLC (http://www.libraw.org, info@libraw.org)
|
||||
|
||||
LibRaw is free software; you can redistribute it and/or modify
|
||||
it under the terms of the one of two licenses as you choose:
|
||||
|
||||
1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1
|
||||
(See file LICENSE.LGPL provided in LibRaw distribution archive for details).
|
||||
|
||||
2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
|
||||
(See file LICENSE.CDDL provided in LibRaw distribution archive for details).
|
||||
|
||||
LibRaw uses code from dcraw.c -- Dave Coffin's raw photo decoder,
|
||||
dcraw.c is copyright 1997-2018 by Dave Coffin, dcoffin a cybercom o net.
|
||||
LibRaw do not use RESTRICTED code from dcraw.c
|
||||
|
||||
LibRaw uses DCB demosaic and FBDD denoise licensed under BSD-like 3-clause license
|
||||
DCB and FBDD are Copyright (C) 2010, Jacek Gozdz (cuniek@kft.umcs.lublin.pl)
|
||||
|
||||
LibRaw uses X3F library to unpack Foveon Files, licensed BSD-style license
|
||||
Copyright (c) 2010, Roland Karlsson (roland@proxel.se)
|
||||
All rights reserved.
|
||||
|
||||
LibRaw uses pieces of code from Adobe DNG SDK 1.4,
|
||||
Copyright (c) 2005 Adobe Systems Incorporated, licensed under MIT license
|
||||
|
2744
libraw/src/main/cpp/LibRaw/Changelog.txt
Normal file
20
libraw/src/main/cpp/LibRaw/DEVELOPER-NOTES
Normal file
@ -0,0 +1,20 @@
|
||||
|
||||
=== Notes for LibRaw contributor ===
|
||||
|
||||
0. Repository
|
||||
LibRaw public repository is located on GitHub
|
||||
URL:
|
||||
http://github.com/LibRaw/LibRaw - main page
|
||||
git://github.com/LibRaw/LibRaw.git - git URL
|
||||
|
||||
If you wish to participate in LibRaw development please use GitHub fork.
|
||||
|
||||
LibRaw distribution files are prepared by ./mkdist.sh script
|
||||
This script
|
||||
- generates ./configure script from autotools stuff
|
||||
- removes developer Makefile
|
||||
- fetches 'Official' dcraw.c from Dave Coffin's site
|
||||
- removes itself
|
||||
|
||||
Feel free to contact us (info@libraw.org or Contact form on www.libraw.org) if
|
||||
you have any questions or suggestions.
|
@ -0,0 +1,21 @@
|
||||
diff --git a/source/dng_ifd.cpp b/source/dng_ifd.cpp
|
||||
index 174f18f..2974323 100644
|
||||
--- a/source/dng_ifd.cpp
|
||||
+++ b/source/dng_ifd.cpp
|
||||
@@ -3168,6 +3168,7 @@ bool dng_ifd::IsValidDNG (dng_shared &shared,
|
||||
case ccUncompressed:
|
||||
break;
|
||||
|
||||
+ case 9: /* VC5 compression support */
|
||||
case ccJPEG:
|
||||
{
|
||||
|
||||
@@ -3202,7 +3203,7 @@ bool dng_ifd::IsValidDNG (dng_shared &shared,
|
||||
break;
|
||||
|
||||
}
|
||||
-
|
||||
+
|
||||
case ccLossyJPEG:
|
||||
{
|
||||
|
@ -0,0 +1,15 @@
|
||||
diff --git a/gpr_sdk/private/gpr_read_image.cpp b/gpr_sdk/private/gpr_read_image.cpp
|
||||
index c611b3f..9200a5b 100644
|
||||
--- a/gpr_sdk/private/gpr_read_image.cpp
|
||||
+++ b/gpr_sdk/private/gpr_read_image.cpp
|
||||
@@ -68,8 +68,10 @@ gpr_read_image::gpr_read_image( gpr_buffer_auto* vc5_buffer ) : _vc5_buffer(vc5_
|
||||
}
|
||||
|
||||
#if GPR_WRITING || GPR_READING
|
||||
+#ifndef qDNG_1_6
|
||||
const int ccVc5 = 9; // Vc5 compression type
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
void gpr_read_image::ReadTile (dng_host &host,
|
||||
const dng_ifd &ifd,
|
@ -0,0 +1,21 @@
|
||||
diff --git a/source/dng_ifd.cpp b/source/dng_ifd.cpp
|
||||
index 174f18f..2974323 100644
|
||||
--- a/source/dng_ifd.cpp
|
||||
+++ b/source/dng_ifd.cpp
|
||||
@@ -3168,6 +3168,7 @@ bool dng_ifd::IsValidDNG (dng_shared &shared,
|
||||
case ccUncompressed:
|
||||
break;
|
||||
|
||||
+ case 9: /* VC5 compression support */
|
||||
case ccJPEG:
|
||||
{
|
||||
|
||||
@@ -3202,7 +3203,7 @@ bool dng_ifd::IsValidDNG (dng_shared &shared,
|
||||
break;
|
||||
|
||||
}
|
||||
-
|
||||
+
|
||||
case ccLossyJPEG:
|
||||
{
|
||||
|
29
libraw/src/main/cpp/LibRaw/GoPro/gpr_read_image.cpp.diff
Normal file
@ -0,0 +1,29 @@
|
||||
--- gpr_read_image.cpp.orig 2019-08-30 12:20:00.326653300 +0300
|
||||
+++ gpr_read_image.cpp 2019-08-31 10:43:26.568184100 +0300
|
||||
@@ -67,6 +67,10 @@
|
||||
fDecodeVC5 = true;
|
||||
}
|
||||
|
||||
void gpr_read_image::ReadTile (dng_host &host,
|
||||
const dng_ifd &ifd,
|
||||
dng_stream &stream,
|
||||
@@ -77,7 +81,8 @@
|
||||
uint32 tileByteCount,
|
||||
AutoPtr<dng_memory_block> &compressedBuffer,
|
||||
AutoPtr<dng_memory_block> &uncompressedBuffer,
|
||||
- AutoPtr<dng_memory_block> &subTileBlockBuffer)
|
||||
+ AutoPtr<dng_memory_block> &subTileBlockBuffer,
|
||||
+ bool usingMultipleThreads)
|
||||
{
|
||||
|
||||
if( ifd.fCompression == ccVc5 )
|
||||
@@ -122,7 +127,8 @@
|
||||
tileByteCount,
|
||||
compressedBuffer,
|
||||
uncompressedBuffer,
|
||||
- subTileBlockBuffer);
|
||||
+ subTileBlockBuffer,
|
||||
+ usingMultipleThreads);
|
||||
}
|
||||
}
|
||||
|
12
libraw/src/main/cpp/LibRaw/GoPro/gpr_read_image.h.diff
Normal file
@ -0,0 +1,12 @@
|
||||
--- gpr_read_image.h.orig 2019-08-30 12:20:00.326653300 +0300
|
||||
+++ gpr_read_image.h 2019-08-30 20:56:11.138246800 +0300
|
||||
@@ -56,7 +56,8 @@
|
||||
uint32 tileByteCount,
|
||||
AutoPtr<dng_memory_block> &compressedBuffer,
|
||||
AutoPtr<dng_memory_block> &uncompressedBuffer,
|
||||
- AutoPtr<dng_memory_block> &subTileBlockBuffer);
|
||||
+ AutoPtr<dng_memory_block> &subTileBlockBuffer,
|
||||
+ bool usingMultipleThreads );
|
||||
};
|
||||
|
||||
#endif // GPR_READING
|
51
libraw/src/main/cpp/LibRaw/INSTALL
Normal file
@ -0,0 +1,51 @@
|
||||
|
||||
========= Installing LibRaw ========
|
||||
|
||||
I. Installation steps
|
||||
|
||||
1. Unpack the distribution file:
|
||||
|
||||
$ tar xzvf LibRaw-0.xx.yy.tar.gz
|
||||
|
||||
2. Go to LibRaw folder and run ./configure and make:
|
||||
|
||||
$ cd LibRaw-0.xx.yy
|
||||
$ ./configure [...optional args...]
|
||||
$ make
|
||||
|
||||
3. install by run make install as root:
|
||||
|
||||
$ sudo make install
|
||||
|
||||
If you're using Github snapshot, create ./configure script:
|
||||
autoreconf --install
|
||||
before using it (you'll need autotools installed).
|
||||
|
||||
Alternatively, you may use pre-created Makefiles (Makefile.dist for Unix,
|
||||
Makefile.msvc for Windows/VisualStudio) and add/remove options by editing
|
||||
these Makefiles
|
||||
|
||||
|
||||
II. ./configure options
|
||||
|
||||
--enable-openmp
|
||||
--disable-openmp
|
||||
|
||||
Enable/disable OpenMP support if compiler supports it.
|
||||
OpenMP is enabled by default.
|
||||
|
||||
|
||||
--enable-lcms
|
||||
--disable-lcms
|
||||
|
||||
Enable/disable LCMS color engine support. If enabled, ./configure will try to
|
||||
find lcms library. Both LCMS-1.x and LCMS-2.x are supported
|
||||
LCMS support is enabled by default
|
||||
|
||||
|
||||
--enable-examples
|
||||
--disable-examples
|
||||
|
||||
Enables/disables examples compilation and installation. Enabled by default
|
||||
|
||||
|
340
libraw/src/main/cpp/LibRaw/LICENSE.CDDL
Normal file
@ -0,0 +1,340 @@
|
||||
COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
|
||||
|
||||
1. Definitions.
|
||||
|
||||
1.1. Contributor means each individual or entity that creates or
|
||||
contributes to the creation of Modifications.
|
||||
|
||||
1.2. Contributor Version means the combination of the Original
|
||||
Software, prior Modifications used by a Contributor (if any),
|
||||
and the Modifications made by that particular Contributor.
|
||||
|
||||
1.3. Covered Software means (a) the Original Software, or (b)
|
||||
Modifications, or (c) the combination of files containing
|
||||
Original Software with files containing Modifications, in each
|
||||
case including portions thereof.
|
||||
|
||||
1.4. Executable means the Covered Software in any form other
|
||||
than Source Code.
|
||||
|
||||
1.5. Initial Developer means the individual or entity that first
|
||||
makes Original Software available under this License.
|
||||
|
||||
1.6. Larger Workmeans a work which combines Covered Software or
|
||||
portions thereof with code not governed by the terms of this
|
||||
License.
|
||||
|
||||
1.7. License means this document.
|
||||
|
||||
1.8. Licensable means having the right to grant, to the maximum
|
||||
extent possible, whether at the time of the initial grant or
|
||||
subsequently acquired, any and all of the rights conveyed herein.
|
||||
|
||||
1.9. Modifications means the Source Code and Executable form of
|
||||
any of the following: A. Any file that results from an addition
|
||||
to, deletion from or modification of the contents of a file
|
||||
containing Original Software or previous Modifications; B. Any
|
||||
new file that contains any part of the Original Software or
|
||||
previous Modification; or C. Any new file that is contributed or
|
||||
otherwise made available under the terms of this License.
|
||||
|
||||
1.10. Original Software means the Source Code and Executable
|
||||
form of computer software code that is originally released under
|
||||
this License.
|
||||
|
||||
1.11. Patent Claims means any patent claim(s), now owned or
|
||||
hereafter acquired, including without limitation, method,
|
||||
process, and apparatus claims, in any patent Licensable by
|
||||
grantor.
|
||||
|
||||
1.12. Source Code means (a) the common form of computer software
|
||||
code in which modifications are made and (b) associated
|
||||
documentation included in or with such code.
|
||||
|
||||
1.13. You (or Your) means an individual or a legal entity
|
||||
exercising rights under, and complying with all of the terms of,
|
||||
this License. For legal entities, You includes any entity which
|
||||
controls, is controlled by, or is under common control with You.
|
||||
For purposes of this definition, control means (a) the power,
|
||||
direct or indirect, to cause the direction or management of such
|
||||
entity, whether by contract or otherwise, or (b) ownership of
|
||||
more than fifty percent (50%) of the outstanding shares or
|
||||
beneficial ownership of such entity.
|
||||
|
||||
2. License Grants.
|
||||
|
||||
2.1. The Initial Developer Grant. Conditioned upon Your
|
||||
compliance with Section 3.1 below and subject to third party
|
||||
intellectual property claims, the Initial Developer hereby
|
||||
grants You a world-wide, royalty-free, non-exclusive license:
|
||||
|
||||
(a) under intellectual property rights (other than patent or
|
||||
trademark) Licensable by Initial Developer, to use, reproduce,
|
||||
modify, display, perform, sublicense and distribute the Original
|
||||
Software (or portions thereof), with or without Modifications,
|
||||
and/or as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims infringed by the making, using or
|
||||
selling of Original Software, to make, have made, use, practice,
|
||||
sell, and offer for sale, and/or otherwise dispose of the
|
||||
Original Software (or portions thereof);
|
||||
|
||||
(c) The licenses granted in Sections 2.1(a) and (b) are
|
||||
effective on the date Initial Developer first distributes or
|
||||
otherwise makes the Original Software available to a third party
|
||||
under the terms of this License;
|
||||
|
||||
(d) Notwithstanding Section 2.1(b) above, no patent license is
|
||||
granted: (1) for code that You delete from the Original
|
||||
Software, or (2) for infringements caused by: (i) the
|
||||
modification of the Original Software, or (ii) the combination
|
||||
of the Original Software with other software or devices.
|
||||
|
||||
2.2. Contributor Grant. Conditioned upon Your compliance with
|
||||
Section 3.1 below and subject to third party intellectual
|
||||
property claims, each Contributor hereby grants You a
|
||||
world-wide, royalty-free, non-exclusive license:
|
||||
|
||||
(a) under intellectual property rights (other than patent or
|
||||
trademark) Licensable by Contributor to use, reproduce, modify,
|
||||
display, perform, sublicense and distribute the Modifications
|
||||
created by such Contributor (or portions thereof), either on an
|
||||
unmodified basis, with other Modifications, as Covered Software
|
||||
and/or as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims infringed by the making, using, or
|
||||
selling of Modifications made by that Contributor either alone
|
||||
and/or in combination with its Contributor Version (or portions
|
||||
of such combination), to make, use, sell, offer for sale, have
|
||||
made, and/or otherwise dispose of: (1) Modifications made by
|
||||
that Contributor (or portions thereof); and (2) the combination
|
||||
of Modifications made by that Contributor with its Contributor
|
||||
Version (or portions of such combination).
|
||||
|
||||
(c) The licenses granted in Sections 2.2(a) and 2.2(b)
|
||||
areeffective on the date Contributor first distributes or
|
||||
otherwise makes the Modifications available to a third party.
|
||||
|
||||
(d) Notwithstanding Section 2.2(b) above, no patent license is
|
||||
granted: (1) for any code that Contributor has deleted from the
|
||||
Contributor Version; (2) for infringements caused by: (i) third
|
||||
party modifications of Contributor Version, or (ii) the
|
||||
combination of Modifications made by that Contributor with other
|
||||
software (except as part of the Contributor Version) or other
|
||||
devices; or (3) under Patent Claims infringed by Covered
|
||||
Software in the absence of Modifications made by that
|
||||
Contributor.
|
||||
|
||||
3. Distribution Obligations.
|
||||
|
||||
3.1. Availability of Source Code. Any Covered Software that You
|
||||
distribute or otherwise make available in Executable form must
|
||||
also be made available in Source Code form and that Source Code
|
||||
form must be distributed only under the terms of this License.
|
||||
You must include a copy of this License with every copy of the
|
||||
Source Code form of the Covered Software You distribute or
|
||||
otherwise make available. You must inform recipients of any such
|
||||
Covered Software in Executable form as to how they can obtain
|
||||
such Covered Software in Source Code form in a reasonable manner
|
||||
on or through a medium customarily used for software exchange.
|
||||
|
||||
3.2. Modifications. The Modifications that You create or to
|
||||
which You contribute are governed by the terms of this License.
|
||||
You represent that You believe Your Modifications are Your
|
||||
original creation(s) and/or You have sufficient rights to grant
|
||||
the rights conveyed by this License.
|
||||
|
||||
3.3. Required Notices. You must include a notice in each of Your
|
||||
Modifications that identifies You as the Contributor of the
|
||||
Modification. You may not remove or alter any copyright, patent
|
||||
or trademark notices contained within the Covered Software, or
|
||||
any notices of licensing or any descriptive text giving
|
||||
attribution to any Contributor or the Initial Developer.
|
||||
|
||||
3.4. Application of Additional Terms. You may not offer or
|
||||
impose any terms on any Covered Software in Source Code form
|
||||
that alters or restricts the applicable version of this License
|
||||
or the recipients rights hereunder. You may choose to offer, and
|
||||
to charge a fee for, warranty, support, indemnity or liability
|
||||
obligations to one or more recipients of Covered
|
||||
Software. However, you may do so only on Your own behalf, and
|
||||
not on behalf of the Initial Developer or any Contributor. You
|
||||
must make it absolutely clear that any such warranty, support,
|
||||
indemnity or liability obligation is offered by You alone, and
|
||||
You hereby agree to indemnify the Initial Developer and every
|
||||
Contributor for any liability incurred by the Initial Developer
|
||||
or such Contributor as a result of warranty, support, indemnity
|
||||
or liability terms You offer.
|
||||
|
||||
3.5. Distribution of Executable Versions. You may distribute the
|
||||
Executable form of the Covered Software under the terms of this
|
||||
License or under the terms of a license of Your choice, which
|
||||
may contain terms different from this License, provided that You
|
||||
are in compliance with the terms of this License and that the
|
||||
license for the Executable form does not attempt to limit or
|
||||
alter the recipients rights in the Source Code form from the
|
||||
rights set forth in this License. If You distribute the Covered
|
||||
Software in Executable form under a different license, You must
|
||||
make it absolutely clear that any terms which differ from this
|
||||
License are offered by You alone, not by the Initial Developer
|
||||
or Contributor. You hereby agree to indemnify the Initial
|
||||
Developer and every Contributor for any liability incurred by
|
||||
the Initial Developer or such Contributor as a result of any
|
||||
such terms You offer.
|
||||
|
||||
3.6. Larger Works. You may create a Larger Work by combining
|
||||
Covered Software with other code not governed by the terms of
|
||||
this License and distribute the Larger Work as a single product.
|
||||
In such a case, You must make sure the requirements of this
|
||||
License are fulfilled for the Covered Software.
|
||||
|
||||
4. Versions of the License.
|
||||
|
||||
4.1. New Versions. Sun Microsystems, Inc. is the initial license
|
||||
steward and may publish revised and/or new versions of this
|
||||
License from time to time. Each version will be given a
|
||||
distinguishing version number. Except as provided in Section
|
||||
4.3, no one other than the license steward has the right to
|
||||
modify this License.
|
||||
|
||||
4.2. Effect of New Versions. You may always continue to use,
|
||||
distribute or otherwise make the Covered Software available
|
||||
under the terms of the version of the License under which You
|
||||
originally received the Covered Software. If the Initial
|
||||
Developer includes a notice in the Original Software prohibiting
|
||||
it from being distributed or otherwise made available under any
|
||||
subsequent version of the License, You must distribute and make
|
||||
the Covered Software available under the terms of the version of
|
||||
the License under which You originally received the Covered
|
||||
Software. Otherwise, You may also choose to use, distribute or
|
||||
otherwise make the Covered Software available under the terms of
|
||||
any subsequent version of the License published by the license
|
||||
steward.
|
||||
|
||||
4.3. Modified Versions. When You are an Initial Developer and
|
||||
You want to create a new license for Your Original Software, You
|
||||
may create and use a modified version of this License if You:
|
||||
(a) rename the license and remove any references to the name of
|
||||
the license steward (except to note that the license differs
|
||||
from this License); and (b) otherwise make it clear that the
|
||||
license contains terms which differ from this License.
|
||||
|
||||
5. DISCLAIMER OF WARRANTY. COVERED SOFTWARE IS PROVIDED UNDER
|
||||
THIS LICENSE ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND,
|
||||
EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION,
|
||||
WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS,
|
||||
MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
|
||||
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED
|
||||
SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE
|
||||
DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY
|
||||
OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN
|
||||
ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE
|
||||
IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
|
||||
|
||||
6. TERMINATION.
|
||||
|
||||
6.1. This License and the rights granted hereunder will
|
||||
terminate automatically if You fail to comply with terms herein
|
||||
and fail to cure such breach within 30 days of becoming aware of
|
||||
the breach. Provisions which, by their nature, must remain in
|
||||
effect beyond the termination of this License shall survive.
|
||||
|
||||
6.2. If You assert a patent infringement claim (excluding
|
||||
declaratory judgment actions) against Initial Developer or a
|
||||
Contributor (the Initial Developer or Contributor against whom
|
||||
You assert such claim is referred to as Participant) alleging
|
||||
that the Participant Software (meaning the Contributor Version
|
||||
where the Participant is a Contributor or the Original Software
|
||||
where the Participant is the Initial Developer) directly or
|
||||
indirectly infringes any patent, then any and all rights granted
|
||||
directly or indirectly to You by such Participant, the Initial
|
||||
Developer (if the Initial Developer is not the Participant) and
|
||||
all Contributors under Sections 2.1 and/or 2.2 of this License
|
||||
shall, upon 60 days notice from Participant terminate
|
||||
prospectively and automatically at the expiration of such 60 day
|
||||
notice period, unless if within such 60 day period You withdraw
|
||||
Your claim with respect to the Participant Software against such
|
||||
Participant either unilaterally or pursuant to a written
|
||||
agreement with Participant.
|
||||
|
||||
6.3. In the event of termination under Sections 6.1 or 6.2
|
||||
above, all end user licenses that have been validly granted by
|
||||
You or any distributor hereunder prior to termination (excluding
|
||||
licenses granted to You by any distributor) shall survive
|
||||
termination.
|
||||
|
||||
7. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO
|
||||
LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR
|
||||
OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER
|
||||
CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY
|
||||
SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY
|
||||
INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
|
||||
CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST
|
||||
PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR
|
||||
MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES,
|
||||
EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY
|
||||
OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO
|
||||
LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH
|
||||
PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH
|
||||
LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR
|
||||
LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS
|
||||
EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
8. U.S. GOVERNMENT END USERS. The Covered Software is a
|
||||
commercial item, as that term is defined in 48 C.F.R. 2.101
|
||||
(Oct. 1995), consisting of commercial computer software (as that
|
||||
term is defined at 48 C.F.R. 252.227-7014(a)(1)) and commercial
|
||||
computer software documentation as such terms are used in 48
|
||||
C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and
|
||||
48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all
|
||||
U.S. Government End Users acquire Covered Software with only
|
||||
those rights set forth herein. This U.S. Government Rights
|
||||
clause is in lieu of, and supersedes, any other FAR, DFAR, or
|
||||
other clause or provision that addresses Government rights in
|
||||
computer software under this License.
|
||||
|
||||
9. MISCELLANEOUS. This License represents the complete agreement
|
||||
concerning subject matter hereof. If any provision of this
|
||||
License is held to be unenforceable, such provision shall be
|
||||
reformed only to the extent necessary to make it enforceable.
|
||||
This License shall be governed by the law of the jurisdiction
|
||||
specified in a notice contained within the Original Software
|
||||
(except to the extent applicable law, if any, provides
|
||||
otherwise), excluding such jurisdictions conflict-of-law
|
||||
provisions. Any litigation relating to this License shall be
|
||||
subject to the jurisdiction of the courts located in the
|
||||
jurisdiction and venue specified in a notice contained within
|
||||
the Original Software, with the losing party responsible for
|
||||
costs, including, without limitation, court costs and reasonable
|
||||
attorneys fees and expenses. The application of the United
|
||||
Nations Convention on Contracts for the International Sale of
|
||||
Goods is expressly excluded. Any law or regulation which
|
||||
provides that the language of a contract shall be construed
|
||||
against the drafter shall not apply to this License. You agree
|
||||
that You alone are responsible for compliance with the United
|
||||
States export administration regulations (and the export control
|
||||
laws and regulation of any other countries) when You use,
|
||||
distribute or otherwise make available any Covered Software.
|
||||
|
||||
10. RESPONSIBILITY FOR CLAIMS. As between Initial Developer and
|
||||
the Contributors, each party is responsible for claims and
|
||||
damages arising, directly or indirectly, out of its utilization
|
||||
of rights under this License and You agree to work with Initial
|
||||
Developer and Contributors to distribute such responsibility on
|
||||
an equitable basis. Nothing herein is intended or shall be
|
||||
deemed to constitute any admission of liability.
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND
|
||||
DISTRIBUTION LICENSE (CDDL): This code is released under the
|
||||
CDDL and shall be governed by the laws of the State of
|
||||
California (excluding conflict-of-law provisions). Any
|
||||
litigation relating to this License shall be subject to the
|
||||
jurisdiction of the Federal Courts of the Northern District of
|
||||
California and the state courts of the State of California, with
|
||||
venue lying in Santa Clara County, California.
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
458
libraw/src/main/cpp/LibRaw/LICENSE.LGPL
Normal file
@ -0,0 +1,458 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
19
libraw/src/main/cpp/LibRaw/LibRaw.pro
Normal file
@ -0,0 +1,19 @@
|
||||
TEMPLATE=subdirs
|
||||
CONFIG+=ordered
|
||||
SUBDIRS= \
|
||||
buildfiles/dcraw_emu.pro \
|
||||
buildfiles/libraw.pro \
|
||||
buildfiles/postprocessing_benchmark.pro \
|
||||
buildfiles/dcraw_half.pro \
|
||||
# buildfiles/half_mt.pro \
|
||||
buildfiles/mem_image.pro \
|
||||
buildfiles/raw-identify.pro \
|
||||
buildfiles/simple_dcraw.pro \
|
||||
buildfiles/multirender_test.pro \
|
||||
buildfiles/unprocessed_raw.pro \
|
||||
buildfiles/4channels.pro \
|
||||
buildfiles/rawtextdump.pro \
|
||||
buildfiles/openbayer_sample.pro
|
||||
|
||||
CONFIG-=qt
|
||||
|
123
libraw/src/main/cpp/LibRaw/LibRaw.sln
Normal file
@ -0,0 +1,123 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.30011.22
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dcraw_emu", "buildfiles\dcraw_emu.vcxproj", "{48688DB8-559A-3DE2-ADDE-5BD27BFEDDA2}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A71D2131-F425-381F-8A9A-29D60132A046} = {A71D2131-F425-381F-8A9A-29D60132A046}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libraw", "buildfiles\libraw.vcxproj", "{A71D2131-F425-381F-8A9A-29D60132A046}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "postprocessing_benchmark", "buildfiles\postprocessing_benchmark.vcxproj", "{5C66A8FA-D211-3E2F-A2F1-0C3C665689CC}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A71D2131-F425-381F-8A9A-29D60132A046} = {A71D2131-F425-381F-8A9A-29D60132A046}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dcraw_half", "buildfiles\dcraw_half.vcxproj", "{C6EACFA3-9FC5-393B-BCF6-2874B05E4581}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A71D2131-F425-381F-8A9A-29D60132A046} = {A71D2131-F425-381F-8A9A-29D60132A046}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mem_image", "buildfiles\mem_image.vcxproj", "{BF8A2750-B847-3BA6-9EAF-05F43380F46C}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A71D2131-F425-381F-8A9A-29D60132A046} = {A71D2131-F425-381F-8A9A-29D60132A046}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "raw-identify", "buildfiles\raw-identify.vcxproj", "{7C4F61DB-717E-36C9-B20E-36F8E218AB51}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A71D2131-F425-381F-8A9A-29D60132A046} = {A71D2131-F425-381F-8A9A-29D60132A046}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simple_dcraw", "buildfiles\simple_dcraw.vcxproj", "{AD1E31D8-A022-3672-982F-C8280A0D6458}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A71D2131-F425-381F-8A9A-29D60132A046} = {A71D2131-F425-381F-8A9A-29D60132A046}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "multirender_test", "buildfiles\multirender_test.vcxproj", "{30D21208-219A-3AA8-ADCF-E6B1FFAF6A73}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A71D2131-F425-381F-8A9A-29D60132A046} = {A71D2131-F425-381F-8A9A-29D60132A046}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unprocessed_raw", "buildfiles\unprocessed_raw.vcxproj", "{1333E21E-D3B5-3640-9A4D-D8955082B855}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A71D2131-F425-381F-8A9A-29D60132A046} = {A71D2131-F425-381F-8A9A-29D60132A046}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "4channels", "buildfiles\4channels.vcxproj", "{F68CBE78-B27A-3A05-BCD3-293E8CAC1C52}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A71D2131-F425-381F-8A9A-29D60132A046} = {A71D2131-F425-381F-8A9A-29D60132A046}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rawtextdump", "buildfiles\rawtextdump.vcxproj", "{53A1E3F0-8032-348E-B3BF-3E540A45005F}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A71D2131-F425-381F-8A9A-29D60132A046} = {A71D2131-F425-381F-8A9A-29D60132A046}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openbayer_sample", "buildfiles\openbayer_sample.vcxproj", "{EF67FEF1-4B19-3765-A660-9F8E9333DEF3}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A71D2131-F425-381F-8A9A-29D60132A046} = {A71D2131-F425-381F-8A9A-29D60132A046}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{48688DB8-559A-3DE2-ADDE-5BD27BFEDDA2}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{48688DB8-559A-3DE2-ADDE-5BD27BFEDDA2}.Debug|x64.Build.0 = Debug|x64
|
||||
{48688DB8-559A-3DE2-ADDE-5BD27BFEDDA2}.Release|x64.ActiveCfg = Release|x64
|
||||
{48688DB8-559A-3DE2-ADDE-5BD27BFEDDA2}.Release|x64.Build.0 = Release|x64
|
||||
{A71D2131-F425-381F-8A9A-29D60132A046}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A71D2131-F425-381F-8A9A-29D60132A046}.Debug|x64.Build.0 = Debug|x64
|
||||
{A71D2131-F425-381F-8A9A-29D60132A046}.Release|x64.ActiveCfg = Release|x64
|
||||
{A71D2131-F425-381F-8A9A-29D60132A046}.Release|x64.Build.0 = Release|x64
|
||||
{5C66A8FA-D211-3E2F-A2F1-0C3C665689CC}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{5C66A8FA-D211-3E2F-A2F1-0C3C665689CC}.Debug|x64.Build.0 = Debug|x64
|
||||
{5C66A8FA-D211-3E2F-A2F1-0C3C665689CC}.Release|x64.ActiveCfg = Release|x64
|
||||
{5C66A8FA-D211-3E2F-A2F1-0C3C665689CC}.Release|x64.Build.0 = Release|x64
|
||||
{C6EACFA3-9FC5-393B-BCF6-2874B05E4581}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{C6EACFA3-9FC5-393B-BCF6-2874B05E4581}.Debug|x64.Build.0 = Debug|x64
|
||||
{C6EACFA3-9FC5-393B-BCF6-2874B05E4581}.Release|x64.ActiveCfg = Release|x64
|
||||
{C6EACFA3-9FC5-393B-BCF6-2874B05E4581}.Release|x64.Build.0 = Release|x64
|
||||
{BF8A2750-B847-3BA6-9EAF-05F43380F46C}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{BF8A2750-B847-3BA6-9EAF-05F43380F46C}.Debug|x64.Build.0 = Debug|x64
|
||||
{BF8A2750-B847-3BA6-9EAF-05F43380F46C}.Release|x64.ActiveCfg = Release|x64
|
||||
{BF8A2750-B847-3BA6-9EAF-05F43380F46C}.Release|x64.Build.0 = Release|x64
|
||||
{7C4F61DB-717E-36C9-B20E-36F8E218AB51}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{7C4F61DB-717E-36C9-B20E-36F8E218AB51}.Debug|x64.Build.0 = Debug|x64
|
||||
{7C4F61DB-717E-36C9-B20E-36F8E218AB51}.Release|x64.ActiveCfg = Release|x64
|
||||
{7C4F61DB-717E-36C9-B20E-36F8E218AB51}.Release|x64.Build.0 = Release|x64
|
||||
{AD1E31D8-A022-3672-982F-C8280A0D6458}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{AD1E31D8-A022-3672-982F-C8280A0D6458}.Debug|x64.Build.0 = Debug|x64
|
||||
{AD1E31D8-A022-3672-982F-C8280A0D6458}.Release|x64.ActiveCfg = Release|x64
|
||||
{AD1E31D8-A022-3672-982F-C8280A0D6458}.Release|x64.Build.0 = Release|x64
|
||||
{30D21208-219A-3AA8-ADCF-E6B1FFAF6A73}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{30D21208-219A-3AA8-ADCF-E6B1FFAF6A73}.Debug|x64.Build.0 = Debug|x64
|
||||
{30D21208-219A-3AA8-ADCF-E6B1FFAF6A73}.Release|x64.ActiveCfg = Release|x64
|
||||
{30D21208-219A-3AA8-ADCF-E6B1FFAF6A73}.Release|x64.Build.0 = Release|x64
|
||||
{1333E21E-D3B5-3640-9A4D-D8955082B855}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{1333E21E-D3B5-3640-9A4D-D8955082B855}.Debug|x64.Build.0 = Debug|x64
|
||||
{1333E21E-D3B5-3640-9A4D-D8955082B855}.Release|x64.ActiveCfg = Release|x64
|
||||
{1333E21E-D3B5-3640-9A4D-D8955082B855}.Release|x64.Build.0 = Release|x64
|
||||
{F68CBE78-B27A-3A05-BCD3-293E8CAC1C52}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{F68CBE78-B27A-3A05-BCD3-293E8CAC1C52}.Debug|x64.Build.0 = Debug|x64
|
||||
{F68CBE78-B27A-3A05-BCD3-293E8CAC1C52}.Release|x64.ActiveCfg = Release|x64
|
||||
{F68CBE78-B27A-3A05-BCD3-293E8CAC1C52}.Release|x64.Build.0 = Release|x64
|
||||
{53A1E3F0-8032-348E-B3BF-3E540A45005F}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{53A1E3F0-8032-348E-B3BF-3E540A45005F}.Debug|x64.Build.0 = Debug|x64
|
||||
{53A1E3F0-8032-348E-B3BF-3E540A45005F}.Release|x64.ActiveCfg = Release|x64
|
||||
{53A1E3F0-8032-348E-B3BF-3E540A45005F}.Release|x64.Build.0 = Release|x64
|
||||
{EF67FEF1-4B19-3765-A660-9F8E9333DEF3}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{EF67FEF1-4B19-3765-A660-9F8E9333DEF3}.Debug|x64.Build.0 = Debug|x64
|
||||
{EF67FEF1-4B19-3765-A660-9F8E9333DEF3}.Release|x64.ActiveCfg = Release|x64
|
||||
{EF67FEF1-4B19-3765-A660-9F8E9333DEF3}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {FB319846-66B9-4F61-8285-5EA4D2F09634}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
2123
libraw/src/main/cpp/LibRaw/Makefile
Normal file
140
libraw/src/main/cpp/LibRaw/Makefile.am
Normal file
@ -0,0 +1,140 @@
|
||||
# autoconf macros
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
AUTOMAKE_OPTIONS=subdir-objects
|
||||
|
||||
LIBRAW_SHLIB_VER = @LIBRAW_SHLIB_VERSION@
|
||||
LIBRAW_RELEASE_VER = @LIBRAW_RELEASE_VERSION@
|
||||
|
||||
# Headers
|
||||
nobase_include_HEADERS = libraw/libraw.h \
|
||||
libraw/libraw_alloc.h \
|
||||
libraw/libraw_const.h \
|
||||
libraw/libraw_datastream.h \
|
||||
libraw/libraw_internal.h \
|
||||
libraw/libraw_types.h \
|
||||
libraw/libraw_version.h
|
||||
|
||||
# Docs
|
||||
doc_DATA = COPYRIGHT \
|
||||
LICENSE.CDDL \
|
||||
LICENSE.LGPL \
|
||||
Changelog.txt
|
||||
|
||||
# pkg-config .pc files
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = libraw.pc libraw_r.pc
|
||||
|
||||
# Libraries
|
||||
lib_LTLIBRARIES = lib/libraw.la lib/libraw_r.la
|
||||
|
||||
lib_libraw_a_CPPFLAGS = -DLIBRAW_NOTHREADS -w
|
||||
lib_libraw_a_SOURCES = src/libraw_c_api.cpp \
|
||||
src/libraw_datastream.cpp src/decoders/canon_600.cpp \
|
||||
src/decoders/crx.cpp src/decoders/decoders_dcraw.cpp \
|
||||
src/decoders/decoders_libraw_dcrdefs.cpp \
|
||||
src/decoders/decoders_libraw.cpp src/decoders/dng.cpp \
|
||||
src/decoders/fp_dng.cpp src/decoders/fuji_compressed.cpp \
|
||||
src/decoders/generic.cpp src/decoders/kodak_decoders.cpp \
|
||||
src/decoders/load_mfbacks.cpp src/decoders/smal.cpp \
|
||||
src/decoders/unpack_thumb.cpp src/decoders/unpack.cpp \
|
||||
src/demosaic/aahd_demosaic.cpp src/demosaic/ahd_demosaic.cpp \
|
||||
src/demosaic/dcb_demosaic.cpp src/demosaic/dht_demosaic.cpp \
|
||||
src/demosaic/misc_demosaic.cpp src/demosaic/xtrans_demosaic.cpp \
|
||||
src/integration/dngsdk_glue.cpp src/integration/rawspeed_glue.cpp\
|
||||
src/metadata/adobepano.cpp src/metadata/canon.cpp \
|
||||
src/metadata/ciff.cpp src/metadata/cr3_parser.cpp \
|
||||
src/metadata/epson.cpp src/metadata/exif_gps.cpp \
|
||||
src/metadata/fuji.cpp src/metadata/identify_tools.cpp \
|
||||
src/metadata/identify.cpp src/metadata/kodak.cpp \
|
||||
src/metadata/leica.cpp src/metadata/makernotes.cpp \
|
||||
src/metadata/mediumformat.cpp src/metadata/minolta.cpp \
|
||||
src/metadata/misc_parsers.cpp src/metadata/nikon.cpp \
|
||||
src/metadata/normalize_model.cpp src/metadata/olympus.cpp \
|
||||
src/metadata/hasselblad_model.cpp \
|
||||
src/metadata/p1.cpp src/metadata/pentax.cpp src/metadata/samsung.cpp \
|
||||
src/metadata/sony.cpp src/metadata/tiff.cpp \
|
||||
src/postprocessing/aspect_ratio.cpp \
|
||||
src/postprocessing/dcraw_process.cpp src/postprocessing/mem_image.cpp \
|
||||
src/postprocessing/postprocessing_aux.cpp \
|
||||
src/postprocessing/postprocessing_utils_dcrdefs.cpp \
|
||||
src/postprocessing/postprocessing_utils.cpp \
|
||||
src/preprocessing/ext_preprocess.cpp src/preprocessing/raw2image.cpp \
|
||||
src/preprocessing/subtract_black.cpp src/tables/cameralist.cpp \
|
||||
src/tables/colorconst.cpp src/tables/colordata.cpp \
|
||||
src/tables/wblists.cpp src/utils/curves.cpp \
|
||||
src/utils/decoder_info.cpp src/utils/init_close_utils.cpp \
|
||||
src/utils/open.cpp src/utils/phaseone_processing.cpp \
|
||||
src/utils/read_utils.cpp src/utils/thumb_utils.cpp \
|
||||
src/utils/utils_dcraw.cpp src/utils/utils_libraw.cpp \
|
||||
src/write/apply_profile.cpp src/write/file_write.cpp \
|
||||
src/write/tiff_writer.cpp src/x3f/x3f_parse_process.cpp \
|
||||
src/x3f/x3f_utils_patched.cpp
|
||||
|
||||
|
||||
lib_libraw_r_a_CXXFLAGS = -pthread -w
|
||||
lib_libraw_r_a_CFLAGS = -pthread -w
|
||||
lib_libraw_la_SOURCES = $(lib_libraw_a_SOURCES)
|
||||
lib_libraw_r_la_SOURCES = $(lib_libraw_a_SOURCES)
|
||||
|
||||
lib_libraw_la_LDFLAGS = -no-undefined -version-info $(LIBRAW_SHLIB_VER)
|
||||
lib_libraw_r_la_LDFLAGS = -no-undefined -version-info $(LIBRAW_SHLIB_VER)
|
||||
|
||||
|
||||
# Sample binaries
|
||||
if EXAMPLES
|
||||
bin_PROGRAMS = bin/raw-identify \
|
||||
bin/unprocessed_raw \
|
||||
bin/4channels \
|
||||
bin/rawtextdump \
|
||||
bin/simple_dcraw \
|
||||
bin/mem_image \
|
||||
bin/dcraw_half \
|
||||
bin/half_mt \
|
||||
bin/multirender_test \
|
||||
bin/postprocessing_benchmark \
|
||||
bin/dcraw_emu
|
||||
endif
|
||||
|
||||
bin_raw_identify_SOURCES = samples/raw-identify.cpp
|
||||
bin_raw_identify_CPPFLAGS = $(lib_libraw_a_CPPFLAGS)
|
||||
bin_raw_identify_LDADD = lib/libraw.la
|
||||
|
||||
bin_unprocessed_raw_SOURCES = samples/unprocessed_raw.cpp
|
||||
bin_unprocessed_raw_CPPFLAGS = $(lib_libraw_a_CPPFLAGS)
|
||||
bin_unprocessed_raw_LDADD = lib/libraw.la
|
||||
|
||||
bin_rawtextdump_SOURCES = samples/rawtextdump.cpp
|
||||
bin_rawtextdump_CPPFLAGS = $(lib_libraw_a_CPPFLAGS)
|
||||
bin_rawtextdump_LDADD = lib/libraw.la
|
||||
|
||||
bin_4channels_SOURCES = samples/4channels.cpp
|
||||
bin_4channels_CPPFLAGS = $(lib_libraw_a_CPPFLAGS)
|
||||
bin_4channels_LDADD = lib/libraw.la
|
||||
|
||||
bin_simple_dcraw_SOURCES = samples/simple_dcraw.cpp
|
||||
bin_simple_dcraw_CPPFLAGS = $(lib_libraw_a_CPPFLAGS)
|
||||
bin_simple_dcraw_LDADD = lib/libraw.la
|
||||
|
||||
bin_multirender_test_SOURCES = samples/multirender_test.cpp
|
||||
bin_multirender_test_CPPFLAGS = $(lib_libraw_a_CPPFLAGS)
|
||||
bin_multirender_test_LDADD = lib/libraw.la
|
||||
|
||||
bin_postprocessing_benchmark_SOURCES = samples/postprocessing_benchmark.cpp
|
||||
bin_postprocessing_benchmark_CPPFLAGS = $(lib_libraw_a_CPPFLAGS)
|
||||
bin_postprocessing_benchmark_LDADD = lib/libraw.la
|
||||
|
||||
bin_mem_image_SOURCES = samples/mem_image_sample.cpp
|
||||
bin_mem_image_CPPFLAGS = $(lib_libraw_a_CPPFLAGS)
|
||||
bin_mem_image_LDADD = lib/libraw.la
|
||||
|
||||
bin_dcraw_half_SOURCES = samples/dcraw_half.c
|
||||
bin_dcraw_half_CPPFLAGS = $(lib_libraw_a_CPPFLAGS)
|
||||
bin_dcraw_half_LDADD = lib/libraw.la
|
||||
|
||||
bin_half_mt_SOURCES = samples/half_mt.c
|
||||
bin_half_mt_CFLAGS = $(lib_libraw_r_a_CXXFLAGS)
|
||||
bin_half_mt_LDADD = lib/libraw_r.la
|
||||
|
||||
bin_dcraw_emu_SOURCES = samples/dcraw_emu.cpp
|
||||
bin_dcraw_emu_CPPFLAGS = $(lib_libraw_a_CPPFLAGS)
|
||||
bin_dcraw_emu_LDADD = lib/libraw.la
|
491
libraw/src/main/cpp/LibRaw/Makefile.devel
Normal file
@ -0,0 +1,491 @@
|
||||
all: library all_samples
|
||||
|
||||
CC=clang
|
||||
CXX=clang++
|
||||
|
||||
#CC=gcc
|
||||
#CXX=g++
|
||||
|
||||
LDADD+=-lz
|
||||
|
||||
CFLAGS=-DLIBRAW_USE_AUTOPTR
|
||||
CFLAGS+= -g -I. -pedantic -Wno-long-long -Wno-overflow -O3
|
||||
|
||||
# macOS dual arch
|
||||
# CFLAGS+=-arch x86_64 -arch arm64
|
||||
|
||||
# RawSpeed Support
|
||||
# CFLAGS+=-DUSE_RAWSPEED -I../RawSpeed -I/opt/local/include/libxml2
|
||||
# LDADD+=-L../RawSpeed/RawSpeed/release -lrawspeed -L/opt/local/include -ljpeg -lxml2
|
||||
# RAWSPEED_DATA=../RawSpeed/data/cameras.xml
|
||||
|
||||
# DNG SDK Support
|
||||
# CFLAGS+=-DUSE_DNGSDK -I../dng_sdk/source
|
||||
# LDADDD+=-L../dng_sdk/release -ldng -ljpeg -lz
|
||||
|
||||
# LCMS support
|
||||
# For lcms2 set -DUSE_LCMS2
|
||||
#CFLAGS+=-DUSE_LCMS2 -I/opt/local/include
|
||||
#LDADD+=-L/opt/local/lib -llcms
|
||||
|
||||
# Jasper support for RedCine
|
||||
#CFLAGS+=-DUSE_JASPER -I/opt/local/include
|
||||
#LDADD+=-L/opt/local/lib -ljasper
|
||||
|
||||
# ZLIB support (FP dng)
|
||||
CFLAGS+=-DUSE_ZLIB
|
||||
LDADD+=-lz
|
||||
|
||||
# JPEG support for DNG and Kodak
|
||||
CFLAGS+=-DUSE_JPEG -I/usr/local/include
|
||||
LDADD+=-L/usr/local/lib -ljpeg
|
||||
|
||||
# LIBJPEG8:
|
||||
CFLAGS+=-DUSE_JPEG8
|
||||
|
||||
CSTFLAGS=$(CFLAGS) -DLIBRAW_NOTHREADS
|
||||
HEADERS=libraw/libraw.h libraw/libraw_alloc.h libraw/libraw_const.h \
|
||||
libraw/libraw_datastream.h libraw/libraw_internal.h \
|
||||
libraw/libraw_types.h libraw/libraw_version.h \
|
||||
internal/dcraw_defs.h internal/dcraw_fileio_defs.h internal/defines.h \
|
||||
internal/dmp_include.h internal/libraw_cameraids.h internal/libraw_cxx_defs.h \
|
||||
internal/libraw_internal_funcs.h internal/var_defines.h internal/x3f_tools.h
|
||||
|
||||
LIB_OBJECTS= object/libraw_datastream.o object/libraw_c_api.o \
|
||||
object/cameralist.o object/fuji_compressed.o \
|
||||
object/crx.o object/fp_dng.o object/decoders_libraw.o \
|
||||
object/unpack.o object/unpack_thumb.o \
|
||||
object/rawspeed_glue.o object/dngsdk_glue.o \
|
||||
object/colorconst.o object/utils_libraw.o object/init_close_utils.o \
|
||||
object/decoder_info.o object/open.o object/phaseone_processing.o \
|
||||
object/thumb_utils.o \
|
||||
object/tiff_writer.o object/subtract_black.o object/postprocessing_utils.o \
|
||||
object/dcraw_process.o object/raw2image.o object/mem_image.o \
|
||||
object/x3f_utils_patched.o object/x3f_parse_process.o \
|
||||
object/read_utils.o object/curves.o object/utils_dcraw.o \
|
||||
object/colordata.o \
|
||||
object/canon_600.o object/decoders_dcraw.o \
|
||||
object/decoders_libraw_dcrdefs.o object/generic.o \
|
||||
object/kodak_decoders.o object/dng.o object/smal.o \
|
||||
object/load_mfbacks.o \
|
||||
object/sony.o object/nikon.o object/samsung.o object/cr3_parser.o \
|
||||
object/canon.o object/epson.o object/olympus.o object/leica.o \
|
||||
object/fuji.o object/adobepano.o object/pentax.o object/p1.o \
|
||||
object/makernotes.o object/exif_gps.o object/kodak.o \
|
||||
object/tiff.o object/ciff.o object/mediumformat.o object/minolta.o \
|
||||
object/identify_tools.o \
|
||||
object/hasselblad_model.o object/normalize_model.o object/identify.o \
|
||||
object/misc_parsers.o object/wblists.o \
|
||||
object/postprocessing_aux.o object/postprocessing_utils_dcrdefs.o \
|
||||
object/aspect_ratio.o \
|
||||
object/misc_demosaic.o object/xtrans_demosaic.o object/ahd_demosaic.o \
|
||||
object/dht_demosaic.o object/aahd_demosaic.o object/dcb_demosaic.o \
|
||||
object/file_write.o \
|
||||
object/ext_preprocess.o object/apply_profile.o
|
||||
|
||||
|
||||
LIB_MT_OBJECTS= object/libraw_datastream.mt.o object/libraw_c_api.mt.o \
|
||||
object/cameralist.mt.o object/fuji_compressed.mt.o \
|
||||
object/crx.mt.o object/fp_dng.mt.o object/decoders_libraw.mt.o \
|
||||
object/unpack.mt.o object/unpack_thumb.mt.o \
|
||||
object/rawspeed_glue.mt.o object/dngsdk_glue.mt.o \
|
||||
object/colorconst.mt.o object/utils_libraw.mt.o \
|
||||
object/init_close_utils.mt.o \
|
||||
object/decoder_info.mt.o object/open.mt.o object/phaseone_processing.mt.o \
|
||||
object/thumb_utils.mt.o \
|
||||
object/tiff_writer.mt.o object/subtract_black.mt.o \
|
||||
object/postprocessing_utils.mt.o object/dcraw_process.mt.o \
|
||||
object/raw2image.mt.o object/mem_image.mt.o \
|
||||
object/x3f_utils_patched.mt.o object/x3f_parse_process.mt.o \
|
||||
object/read_utils.mt.o object/curves.mt.o object/utils_dcraw.mt.o \
|
||||
object/colordata.mt.o \
|
||||
object/canon_600.mt.o object/decoders_dcraw.mt.o \
|
||||
object/decoders_libraw_dcrdefs.mt.o object/generic.mt.o \
|
||||
object/kodak_decoders.mt.o object/dng.mt.o object/smal.mt.o \
|
||||
object/load_mfbacks.mt.o \
|
||||
object/sony.mt.o object/nikon.mt.o object/samsung.mt.o \
|
||||
object/cr3_parser.mt.o object/canon.mt.o object/epson.mt.o \
|
||||
object/olympus.mt.o object/leica.mt.o \
|
||||
object/fuji.mt.o object/adobepano.mt.o object/pentax.mt.o object/p1.mt.o \
|
||||
object/makernotes.mt.o object/exif_gps.mt.o object/kodak.mt.o \
|
||||
object/tiff.mt.o object/ciff.mt.o object/mediumformat.mt.o \
|
||||
object/minolta.mt.o \
|
||||
object/identify_tools.mt.o \
|
||||
object/hasselblad_model.mt.o object/normalize_model.mt.o object/identify.mt.o \
|
||||
object/misc_parsers.mt.o object/wblists.mt.o \
|
||||
object/postprocessing_aux.mt.o object/postprocessing_utils_dcrdefs.mt.o \
|
||||
object/aspect_ratio.mt.o \
|
||||
object/misc_demosaic.mt.o object/xtrans_demosaic.mt.o \
|
||||
object/ahd_demosaic.mt.o object/dht_demosaic.mt.o \
|
||||
object/aahd_demosaic.mt.o object/dcb_demosaic.mt.o \
|
||||
object/file_write.mt.o \
|
||||
object/ext_preprocess.mt.o object/apply_profile.mt.o
|
||||
|
||||
|
||||
LR_INCLUDES=libraw/libraw.h libraw/libraw_alloc.h \
|
||||
libraw/libraw_const.h libraw/libraw_datastream.h \
|
||||
libraw/libraw_internal.h libraw/libraw_types.h \
|
||||
libraw/libraw_version.h
|
||||
|
||||
library: lib/libraw.a lib/libraw_r.a
|
||||
|
||||
all_samples: bin/raw-identify bin/simple_dcraw bin/dcraw_emu \
|
||||
bin/dcraw_half bin/half_mt bin/mem_image \
|
||||
bin/unprocessed_raw bin/4channels bin/multirender_test \
|
||||
bin/postprocessing_benchmark bin/rawtextdump
|
||||
|
||||
## RawSpeed xml file
|
||||
|
||||
RawSpeed/rawspeed_xmldata.cpp: ${RAWSPEED_DATA}
|
||||
./rsxml2c.sh ${RAWSPEED_DATA} > RawSpeed/rawspeed_xmldata.cpp
|
||||
|
||||
## Samples ##
|
||||
bin/raw-identify: lib/libraw.a samples/raw-identify.cpp $(HEADERS)
|
||||
$(CXX) ${CFLAGS} -o bin/raw-identify samples/raw-identify.cpp -L./lib -lraw -lm ${LDADD}
|
||||
|
||||
bin/simple_dcraw: lib/libraw.a samples/simple_dcraw.cpp $(HEADERS)
|
||||
$(CXX) -DLIBRAW_NOTHREADS ${CFLAGS} -o bin/simple_dcraw samples/simple_dcraw.cpp -L./lib -lraw -lm ${LDADD}
|
||||
|
||||
bin/multirender_test: lib/libraw.a samples/multirender_test.cpp $(HEADERS)
|
||||
$(CXX) -DLIBRAW_NOTHREADS ${CFLAGS} -o bin/multirender_test samples/multirender_test.cpp -L./lib -lraw -lm ${LDADD}
|
||||
|
||||
bin/postprocessing_benchmark: lib/libraw.a samples/postprocessing_benchmark.cpp $(HEADERS)
|
||||
$(CXX) -DLIBRAW_NOTHREADS ${CFLAGS} -o bin/postprocessing_benchmark samples/postprocessing_benchmark.cpp -L./lib -lraw -lm ${LDADD}
|
||||
|
||||
bin/unprocessed_raw: lib/libraw.a samples/unprocessed_raw.cpp $(HEADERS)
|
||||
$(CXX) -DLIBRAW_NOTHREADS ${CFLAGS} -o bin/unprocessed_raw samples/unprocessed_raw.cpp -L./lib -lraw -lm ${LDADD}
|
||||
|
||||
bin/rawtextdump: lib/libraw.a samples/rawtextdump.cpp $(HEADERS)
|
||||
${CXX} -DLIBRAW_NOTHREADS ${CFLAGS} -o bin/rawtextdump samples/rawtextdump.cpp -L./lib -lraw -lm ${LDADD}
|
||||
|
||||
bin/4channels: lib/libraw.a samples/4channels.cpp $(HEADERS)
|
||||
$(CXX) -DLIBRAW_NOTHREADS ${CFLAGS} -o bin/4channels samples/4channels.cpp -L./lib -lraw -lm ${LDADD}
|
||||
|
||||
bin/mem_image: lib/libraw.a samples/mem_image_sample.cpp $(HEADERS)
|
||||
$(CXX) ${CFLAGS} -o bin/mem_image samples/mem_image_sample.cpp -L./lib -lraw -lm ${LDADD}
|
||||
|
||||
bin/dcraw_half: lib/libraw.a samples/dcraw_half.c $(HEADERS)
|
||||
$(CC) ${CFLAGS} -o bin/dcraw_half samples/dcraw_half.c -L./lib -lraw -lm -lstdc++ ${LDADD}
|
||||
|
||||
bin/half_mt: lib/libraw_r.a samples/half_mt.c $(HEADERS)
|
||||
$(CC) -pthread ${CFLAGS} -o bin/half_mt samples/half_mt.c -L./lib -lraw_r -lm -lstdc++ ${LDADD}
|
||||
|
||||
bin/dcraw_emu: lib/libraw.a samples/dcraw_emu.cpp $(HEADERS)
|
||||
$(CXX) ${CFLAGS} -o bin/dcraw_emu samples/dcraw_emu.cpp -L./lib -lraw_r -lm ${LDADD}
|
||||
|
||||
lib/libraw.a: ${LIB_OBJECTS}
|
||||
rm -f lib/libraw.a
|
||||
ar crv lib/libraw.a ${LIB_OBJECTS}
|
||||
ranlib lib/libraw.a
|
||||
|
||||
lib/libraw_r.a: ${LIB_MT_OBJECTS}
|
||||
rm -f lib/libraw_r.a
|
||||
ar crv lib/libraw_r.a ${LIB_MT_OBJECTS}
|
||||
ranlib lib/libraw_r.a
|
||||
|
||||
clean:
|
||||
rm -fr bin/*.dSYM
|
||||
rm -f *.o *~ src/*~ samples/*~ internal/*~ libraw/*~ lib/lib*.a bin/[4a-z]* object/*.o object/*.mto dcraw/*~ doc/*~ bin/*~ src/*/*~
|
||||
|
||||
## script-created rules
|
||||
object/libraw_c_api.o: src/libraw_c_api.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/libraw_c_api.o src/libraw_c_api.cpp
|
||||
object/libraw_c_api.mt.o: src/libraw_c_api.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/libraw_c_api.mt.o src/libraw_c_api.cpp
|
||||
|
||||
object/libraw_datastream.o: src/libraw_datastream.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/libraw_datastream.o src/libraw_datastream.cpp
|
||||
object/libraw_datastream.mt.o: src/libraw_datastream.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/libraw_datastream.mt.o src/libraw_datastream.cpp
|
||||
object/canon_600.o: src/decoders/canon_600.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/canon_600.o src/decoders/canon_600.cpp
|
||||
object/canon_600.mt.o: src/decoders/canon_600.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/canon_600.mt.o src/decoders/canon_600.cpp
|
||||
object/crx.o: src/decoders/crx.cpp
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/crx.o src/decoders/crx.cpp
|
||||
object/crx.mt.o: src/decoders/crx.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/crx.mt.o src/decoders/crx.cpp
|
||||
object/decoders_dcraw.o: src/decoders/decoders_dcraw.cpp
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/decoders_dcraw.o src/decoders/decoders_dcraw.cpp
|
||||
object/decoders_dcraw.mt.o: src/decoders/decoders_dcraw.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/decoders_dcraw.mt.o src/decoders/decoders_dcraw.cpp
|
||||
object/decoders_libraw_dcrdefs.o: src/decoders/decoders_libraw_dcrdefs.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/decoders_libraw_dcrdefs.o src/decoders/decoders_libraw_dcrdefs.cpp
|
||||
object/decoders_libraw_dcrdefs.mt.o: src/decoders/decoders_libraw_dcrdefs.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/decoders_libraw_dcrdefs.mt.o src/decoders/decoders_libraw_dcrdefs.cpp
|
||||
object/decoders_libraw.o: src/decoders/decoders_libraw.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/decoders_libraw.o src/decoders/decoders_libraw.cpp
|
||||
object/decoders_libraw.mt.o: src/decoders/decoders_libraw.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/decoders_libraw.mt.o src/decoders/decoders_libraw.cpp
|
||||
object/dng.o: src/decoders/dng.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/dng.o src/decoders/dng.cpp
|
||||
object/dng.mt.o: src/decoders/dng.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/dng.mt.o src/decoders/dng.cpp
|
||||
object/fp_dng.o: src/decoders/fp_dng.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/fp_dng.o src/decoders/fp_dng.cpp
|
||||
object/fp_dng.mt.o: src/decoders/fp_dng.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/fp_dng.mt.o src/decoders/fp_dng.cpp
|
||||
object/fuji_compressed.o: src/decoders/fuji_compressed.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/fuji_compressed.o src/decoders/fuji_compressed.cpp
|
||||
object/fuji_compressed.mt.o: src/decoders/fuji_compressed.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/fuji_compressed.mt.o src/decoders/fuji_compressed.cpp
|
||||
object/generic.o: src/decoders/generic.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/generic.o src/decoders/generic.cpp
|
||||
object/generic.mt.o: src/decoders/generic.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/generic.mt.o src/decoders/generic.cpp
|
||||
object/kodak_decoders.o: src/decoders/kodak_decoders.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/kodak_decoders.o src/decoders/kodak_decoders.cpp
|
||||
object/kodak_decoders.mt.o: src/decoders/kodak_decoders.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/kodak_decoders.mt.o src/decoders/kodak_decoders.cpp
|
||||
object/load_mfbacks.o: src/decoders/load_mfbacks.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/load_mfbacks.o src/decoders/load_mfbacks.cpp
|
||||
object/load_mfbacks.mt.o: src/decoders/load_mfbacks.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/load_mfbacks.mt.o src/decoders/load_mfbacks.cpp
|
||||
object/smal.o: src/decoders/smal.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/smal.o src/decoders/smal.cpp
|
||||
object/smal.mt.o: src/decoders/smal.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/smal.mt.o src/decoders/smal.cpp
|
||||
object/unpack_thumb.o: src/decoders/unpack_thumb.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/unpack_thumb.o src/decoders/unpack_thumb.cpp
|
||||
object/unpack_thumb.mt.o: src/decoders/unpack_thumb.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/unpack_thumb.mt.o src/decoders/unpack_thumb.cpp
|
||||
object/unpack.o: src/decoders/unpack.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/unpack.o src/decoders/unpack.cpp
|
||||
object/unpack.mt.o: src/decoders/unpack.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/unpack.mt.o src/decoders/unpack.cpp
|
||||
object/aahd_demosaic.o: src/demosaic/aahd_demosaic.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/aahd_demosaic.o src/demosaic/aahd_demosaic.cpp
|
||||
object/aahd_demosaic.mt.o: src/demosaic/aahd_demosaic.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/aahd_demosaic.mt.o src/demosaic/aahd_demosaic.cpp
|
||||
object/ahd_demosaic.o: src/demosaic/ahd_demosaic.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/ahd_demosaic.o src/demosaic/ahd_demosaic.cpp
|
||||
object/ahd_demosaic.mt.o: src/demosaic/ahd_demosaic.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/ahd_demosaic.mt.o src/demosaic/ahd_demosaic.cpp
|
||||
object/dcb_demosaic.o: src/demosaic/dcb_demosaic.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/dcb_demosaic.o src/demosaic/dcb_demosaic.cpp
|
||||
object/dcb_demosaic.mt.o: src/demosaic/dcb_demosaic.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/dcb_demosaic.mt.o src/demosaic/dcb_demosaic.cpp
|
||||
object/dht_demosaic.o: src/demosaic/dht_demosaic.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/dht_demosaic.o src/demosaic/dht_demosaic.cpp
|
||||
object/dht_demosaic.mt.o: src/demosaic/dht_demosaic.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/dht_demosaic.mt.o src/demosaic/dht_demosaic.cpp
|
||||
object/misc_demosaic.o: src/demosaic/misc_demosaic.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/misc_demosaic.o src/demosaic/misc_demosaic.cpp
|
||||
object/misc_demosaic.mt.o: src/demosaic/misc_demosaic.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/misc_demosaic.mt.o src/demosaic/misc_demosaic.cpp
|
||||
object/xtrans_demosaic.o: src/demosaic/xtrans_demosaic.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/xtrans_demosaic.o src/demosaic/xtrans_demosaic.cpp
|
||||
object/xtrans_demosaic.mt.o: src/demosaic/xtrans_demosaic.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/xtrans_demosaic.mt.o src/demosaic/xtrans_demosaic.cpp
|
||||
object/dngsdk_glue.o: src/integration/dngsdk_glue.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/dngsdk_glue.o src/integration/dngsdk_glue.cpp
|
||||
object/dngsdk_glue.mt.o: src/integration/dngsdk_glue.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/dngsdk_glue.mt.o src/integration/dngsdk_glue.cpp
|
||||
object/rawspeed_glue.o: src/integration/rawspeed_glue.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/rawspeed_glue.o src/integration/rawspeed_glue.cpp
|
||||
object/rawspeed_glue.mt.o: src/integration/rawspeed_glue.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/rawspeed_glue.mt.o src/integration/rawspeed_glue.cpp
|
||||
object/adobepano.o: src/metadata/adobepano.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/adobepano.o src/metadata/adobepano.cpp
|
||||
object/adobepano.mt.o: src/metadata/adobepano.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/adobepano.mt.o src/metadata/adobepano.cpp
|
||||
object/canon.o: src/metadata/canon.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/canon.o src/metadata/canon.cpp
|
||||
object/canon.mt.o: src/metadata/canon.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/canon.mt.o src/metadata/canon.cpp
|
||||
object/ciff.o: src/metadata/ciff.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/ciff.o src/metadata/ciff.cpp
|
||||
object/ciff.mt.o: src/metadata/ciff.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/ciff.mt.o src/metadata/ciff.cpp
|
||||
object/cr3_parser.o: src/metadata/cr3_parser.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/cr3_parser.o src/metadata/cr3_parser.cpp
|
||||
object/cr3_parser.mt.o: src/metadata/cr3_parser.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/cr3_parser.mt.o src/metadata/cr3_parser.cpp
|
||||
object/epson.o: src/metadata/epson.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/epson.o src/metadata/epson.cpp
|
||||
object/epson.mt.o: src/metadata/epson.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/epson.mt.o src/metadata/epson.cpp
|
||||
object/exif_gps.o: src/metadata/exif_gps.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/exif_gps.o src/metadata/exif_gps.cpp
|
||||
object/exif_gps.mt.o: src/metadata/exif_gps.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/exif_gps.mt.o src/metadata/exif_gps.cpp
|
||||
object/fuji.o: src/metadata/fuji.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/fuji.o src/metadata/fuji.cpp
|
||||
object/fuji.mt.o: src/metadata/fuji.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/fuji.mt.o src/metadata/fuji.cpp
|
||||
object/identify_tools.o: src/metadata/identify_tools.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/identify_tools.o src/metadata/identify_tools.cpp
|
||||
object/identify_tools.mt.o: src/metadata/identify_tools.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/identify_tools.mt.o src/metadata/identify_tools.cpp
|
||||
object/identify.o: src/metadata/identify.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/identify.o src/metadata/identify.cpp
|
||||
object/identify.mt.o: src/metadata/identify.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/identify.mt.o src/metadata/identify.cpp
|
||||
object/kodak.o: src/metadata/kodak.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/kodak.o src/metadata/kodak.cpp
|
||||
object/kodak.mt.o: src/metadata/kodak.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/kodak.mt.o src/metadata/kodak.cpp
|
||||
object/leica.o: src/metadata/leica.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/leica.o src/metadata/leica.cpp
|
||||
object/leica.mt.o: src/metadata/leica.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/leica.mt.o src/metadata/leica.cpp
|
||||
object/makernotes.o: src/metadata/makernotes.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/makernotes.o src/metadata/makernotes.cpp
|
||||
object/makernotes.mt.o: src/metadata/makernotes.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/makernotes.mt.o src/metadata/makernotes.cpp
|
||||
object/mediumformat.o: src/metadata/mediumformat.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/mediumformat.o src/metadata/mediumformat.cpp
|
||||
object/mediumformat.mt.o: src/metadata/mediumformat.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/mediumformat.mt.o src/metadata/mediumformat.cpp
|
||||
object/minolta.o: src/metadata/minolta.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/minolta.o src/metadata/minolta.cpp
|
||||
object/minolta.mt.o: src/metadata/minolta.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/minolta.mt.o src/metadata/minolta.cpp
|
||||
object/misc_parsers.o: src/metadata/misc_parsers.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/misc_parsers.o src/metadata/misc_parsers.cpp
|
||||
object/misc_parsers.mt.o: src/metadata/misc_parsers.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/misc_parsers.mt.o src/metadata/misc_parsers.cpp
|
||||
object/nikon.o: src/metadata/nikon.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/nikon.o src/metadata/nikon.cpp
|
||||
object/nikon.mt.o: src/metadata/nikon.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/nikon.mt.o src/metadata/nikon.cpp
|
||||
object/hasselblad_model.o: src/metadata/hasselblad_model.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/hasselblad_model.o src/metadata/hasselblad_model.cpp
|
||||
object/hasselblad_model.mt.o: src/metadata/hasselblad_model.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/hasselblad_model.mt.o src/metadata/hasselblad_model.cpp
|
||||
object/normalize_model.o: src/metadata/normalize_model.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/normalize_model.o src/metadata/normalize_model.cpp
|
||||
object/normalize_model.mt.o: src/metadata/normalize_model.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/normalize_model.mt.o src/metadata/normalize_model.cpp
|
||||
object/olympus.o: src/metadata/olympus.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/olympus.o src/metadata/olympus.cpp
|
||||
object/olympus.mt.o: src/metadata/olympus.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/olympus.mt.o src/metadata/olympus.cpp
|
||||
object/p1.o: src/metadata/p1.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/p1.o src/metadata/p1.cpp
|
||||
object/p1.mt.o: src/metadata/p1.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/p1.mt.o src/metadata/p1.cpp
|
||||
object/pentax.o: src/metadata/pentax.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/pentax.o src/metadata/pentax.cpp
|
||||
object/pentax.mt.o: src/metadata/pentax.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/pentax.mt.o src/metadata/pentax.cpp
|
||||
object/samsung.o: src/metadata/samsung.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/samsung.o src/metadata/samsung.cpp
|
||||
object/samsung.mt.o: src/metadata/samsung.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/samsung.mt.o src/metadata/samsung.cpp
|
||||
object/sony.o: src/metadata/sony.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/sony.o src/metadata/sony.cpp
|
||||
object/sony.mt.o: src/metadata/sony.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/sony.mt.o src/metadata/sony.cpp
|
||||
object/tiff.o: src/metadata/tiff.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/tiff.o src/metadata/tiff.cpp
|
||||
object/tiff.mt.o: src/metadata/tiff.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/tiff.mt.o src/metadata/tiff.cpp
|
||||
object/aspect_ratio.o: src/postprocessing/aspect_ratio.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/aspect_ratio.o src/postprocessing/aspect_ratio.cpp
|
||||
object/aspect_ratio.mt.o: src/postprocessing/aspect_ratio.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/aspect_ratio.mt.o src/postprocessing/aspect_ratio.cpp
|
||||
object/dcraw_process.o: src/postprocessing/dcraw_process.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/dcraw_process.o src/postprocessing/dcraw_process.cpp
|
||||
object/dcraw_process.mt.o: src/postprocessing/dcraw_process.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/dcraw_process.mt.o src/postprocessing/dcraw_process.cpp
|
||||
object/mem_image.o: src/postprocessing/mem_image.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/mem_image.o src/postprocessing/mem_image.cpp
|
||||
object/mem_image.mt.o: src/postprocessing/mem_image.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/mem_image.mt.o src/postprocessing/mem_image.cpp
|
||||
object/postprocessing_aux.o: src/postprocessing/postprocessing_aux.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/postprocessing_aux.o src/postprocessing/postprocessing_aux.cpp
|
||||
object/postprocessing_aux.mt.o: src/postprocessing/postprocessing_aux.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/postprocessing_aux.mt.o src/postprocessing/postprocessing_aux.cpp
|
||||
object/postprocessing_utils_dcrdefs.o: src/postprocessing/postprocessing_utils_dcrdefs.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/postprocessing_utils_dcrdefs.o src/postprocessing/postprocessing_utils_dcrdefs.cpp
|
||||
object/postprocessing_utils_dcrdefs.mt.o: src/postprocessing/postprocessing_utils_dcrdefs.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/postprocessing_utils_dcrdefs.mt.o src/postprocessing/postprocessing_utils_dcrdefs.cpp
|
||||
object/postprocessing_utils.o: src/postprocessing/postprocessing_utils.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/postprocessing_utils.o src/postprocessing/postprocessing_utils.cpp
|
||||
object/postprocessing_utils.mt.o: src/postprocessing/postprocessing_utils.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/postprocessing_utils.mt.o src/postprocessing/postprocessing_utils.cpp
|
||||
object/raw2image.o: src/preprocessing/raw2image.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/raw2image.o src/preprocessing/raw2image.cpp
|
||||
object/raw2image.mt.o: src/preprocessing/raw2image.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/raw2image.mt.o src/preprocessing/raw2image.cpp
|
||||
object/ext_preprocess.o: src/preprocessing/ext_preprocess.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/ext_preprocess.o src/preprocessing/ext_preprocess.cpp
|
||||
object/ext_preprocess.mt.o: src/preprocessing/ext_preprocess.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/ext_preprocess.mt.o src/preprocessing/ext_preprocess.cpp
|
||||
object/subtract_black.o: src/preprocessing/subtract_black.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/subtract_black.o src/preprocessing/subtract_black.cpp
|
||||
object/subtract_black.mt.o: src/preprocessing/subtract_black.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/subtract_black.mt.o src/preprocessing/subtract_black.cpp
|
||||
object/cameralist.o: src/tables/cameralist.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/cameralist.o src/tables/cameralist.cpp
|
||||
object/cameralist.mt.o: src/tables/cameralist.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/cameralist.mt.o src/tables/cameralist.cpp
|
||||
object/colorconst.o: src/tables/colorconst.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/colorconst.o src/tables/colorconst.cpp
|
||||
object/colorconst.mt.o: src/tables/colorconst.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/colorconst.mt.o src/tables/colorconst.cpp
|
||||
object/colordata.o: src/tables/colordata.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/colordata.o src/tables/colordata.cpp
|
||||
object/colordata.mt.o: src/tables/colordata.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/colordata.mt.o src/tables/colordata.cpp
|
||||
object/wblists.o: src/tables/wblists.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/wblists.o src/tables/wblists.cpp
|
||||
object/wblists.mt.o: src/tables/wblists.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/wblists.mt.o src/tables/wblists.cpp
|
||||
object/curves.o: src/utils/curves.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/curves.o src/utils/curves.cpp
|
||||
object/curves.mt.o: src/utils/curves.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/curves.mt.o src/utils/curves.cpp
|
||||
object/decoder_info.o: src/utils/decoder_info.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/decoder_info.o src/utils/decoder_info.cpp
|
||||
object/decoder_info.mt.o: src/utils/decoder_info.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/decoder_info.mt.o src/utils/decoder_info.cpp
|
||||
object/init_close_utils.o: src/utils/init_close_utils.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/init_close_utils.o src/utils/init_close_utils.cpp
|
||||
object/init_close_utils.mt.o: src/utils/init_close_utils.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/init_close_utils.mt.o src/utils/init_close_utils.cpp
|
||||
object/open.o: src/utils/open.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/open.o src/utils/open.cpp
|
||||
object/open.mt.o: src/utils/open.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/open.mt.o src/utils/open.cpp
|
||||
object/phaseone_processing.o: src/utils/phaseone_processing.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/phaseone_processing.o src/utils/phaseone_processing.cpp
|
||||
object/phaseone_processing.mt.o: src/utils/phaseone_processing.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/phaseone_processing.mt.o src/utils/phaseone_processing.cpp
|
||||
object/read_utils.o: src/utils/read_utils.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/read_utils.o src/utils/read_utils.cpp
|
||||
object/read_utils.mt.o: src/utils/read_utils.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/read_utils.mt.o src/utils/read_utils.cpp
|
||||
object/thumb_utils.o: src/utils/thumb_utils.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/thumb_utils.o src/utils/thumb_utils.cpp
|
||||
object/thumb_utils.mt.o: src/utils/thumb_utils.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/thumb_utils.mt.o src/utils/thumb_utils.cpp
|
||||
object/utils_dcraw.o: src/utils/utils_dcraw.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/utils_dcraw.o src/utils/utils_dcraw.cpp
|
||||
object/utils_dcraw.mt.o: src/utils/utils_dcraw.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/utils_dcraw.mt.o src/utils/utils_dcraw.cpp
|
||||
object/utils_libraw.o: src/utils/utils_libraw.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/utils_libraw.o src/utils/utils_libraw.cpp
|
||||
object/utils_libraw.mt.o: src/utils/utils_libraw.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/utils_libraw.mt.o src/utils/utils_libraw.cpp
|
||||
object/apply_profile.o: src/write/apply_profile.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/apply_profile.o src/write/apply_profile.cpp
|
||||
object/apply_profile.mt.o: src/write/apply_profile.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/apply_profile.mt.o src/write/apply_profile.cpp
|
||||
object/file_write.o: src/write/file_write.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/file_write.o src/write/file_write.cpp
|
||||
object/file_write.mt.o: src/write/file_write.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/file_write.mt.o src/write/file_write.cpp
|
||||
object/tiff_writer.o: src/write/tiff_writer.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/tiff_writer.o src/write/tiff_writer.cpp
|
||||
object/tiff_writer.mt.o: src/write/tiff_writer.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/tiff_writer.mt.o src/write/tiff_writer.cpp
|
||||
object/x3f_parse_process.o: src/x3f/x3f_parse_process.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/x3f_parse_process.o src/x3f/x3f_parse_process.cpp
|
||||
object/x3f_parse_process.mt.o: src/x3f/x3f_parse_process.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/x3f_parse_process.mt.o src/x3f/x3f_parse_process.cpp
|
||||
object/x3f_utils_patched.o: src/x3f/x3f_utils_patched.cpp $(HEADERS)
|
||||
${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} -o object/x3f_utils_patched.o src/x3f/x3f_utils_patched.cpp
|
||||
object/x3f_utils_patched.mt.o: src/x3f/x3f_utils_patched.cpp $(HEADERS)
|
||||
${CXX} -c ${CFLAGS} -o object/x3f_utils_patched.mt.o src/x3f/x3f_utils_patched.cpp
|