|
Replies:
33
-
Pages:
3
[
1
2
3
| Next
]
-
Last Post:
13 Feb 25, 12:47
Last Post By: davidekholm
|
Threads:
[
Previous
|
Next
]
|
|
Posts:
3,668
Registered:
18-Oct-2002
|
|
|
Updated RAW file support for jAlbum
Posted:
6 Feb 25, 22:02
|
|
|
I've now taken the time to update jAlbum's seriously outdated RAW support.
Changes:
- Uses the most current version of http://libraw.org/ (v24.0). This version seems to be 20% faster than the old version we've been using and should hopefully not crash with modern RAW files. Please test.
- Rewritten Java integration using the most recent and performant FFM API (Foreign Function and Memory). Requires Java 23, i.e. jAlbum 37. The new Java integration is also using multiple threads better = better performance.
- Now supports arm64 based Linux distros as well as Intel based
- Now supports M-series Macs ("Apple Silicon", actually arm architecture as well) as well as Intel Mac
Comparison: Building a gallery consisting of 64 RAW images using the old RAW support on a 4 core Intel Mac: 28.3s
Building the same gallery on a 10 core MacBookPro ("M4") using the updated RAW support: 2.5s
To try this support, you need at least jAlbum 37.
Steps to install:
1) Download https://jalbum.net/download/jLibRaw2.jar to jAlbum's lib folder
2) Rename lib/jlibraw-all.jar to libraw-all.dis
3) Start jAlbum
Edited by: davidekholm on 7 Feb 2025, 22:17
|
|
|
Posts:
3,967
Registered:
4-Aug-2006
|
|
|
Re: Updated RAW file support for jAlbum
Posted:
7 Feb 25, 21:35
in response to: davidekholm
|
|
|
Finally got some time to test, I don't see the file you mention: lib/libraw-all.jar
What I do have is a file called: jlibraw-dummy.jar
|
|
|
Posts:
3,668
Registered:
18-Oct-2002
|
|
|
Re: Updated RAW file support for jAlbum
Posted:
7 Feb 25, 22:17
in response to: RobM
|
|
|
Sorry, it’s jlibraw-all.jar
|
|
|
Posts:
3,967
Registered:
4-Aug-2006
|
|
|
Re: Updated RAW file support for jAlbum
Posted:
7 Feb 25, 23:22
in response to: davidekholm
|
|
|
|
See attached screen grab, files in alphabetical order - there is no jlibraw-all.jar.
The closest is jlibraw-dummy.jar, which contains a file lib>darwin_universal.dylib
To be doubly sure I have the current version I download the latest version of jAlbum 37.0.6
|
|
|
Posts:
3,967
Registered:
4-Aug-2006
|
|
|
Re: Updated RAW file support for jAlbum
Posted:
7 Feb 25, 23:32
in response to: RobM
|
|
|
Further, I create a new test project and drag raw files to jAlbum, nothing shows in the explorer..
I then added the new LibRaw2.jar file and restarted jAlbum. Dropping a raw file now gives this error WARNING: A restricted method in java.lang.foreign.SymbolLookup has been called
WARNING: java.lang.foreign.SymbolLookup::libraryLookup has been called by net.jalbum.libraries.LookupService in an unnamed module
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled
Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
at net.jalbum.jlibraw.LibRawImageReader.readInitial(LibRawImageReader.java:284)
at net.jalbum.jlibraw.LibRawImageReader.doReadThumbnail(LibRawImageReader.java:250)
at net.jalbum.jlibraw.LibRawImageReader.readThumbnail(LibRawImageReader.java:202)
at se.datadosen.jalbum.AlbumObjectImpl.readEmbeddedThumbnail(AlbumObjectImpl.java:2340)
at se.datadosen.jalbum.AlbumObjectImpl.doGetRepresentingIcon(AlbumObjectImpl.java:2247)
at se.datadosen.jalbum.AlbumObjectImpl.getRepresentingIcon(AlbumObjectImpl.java:2150)
at se.datadosen.jalbum.AlbumObjectImpl.getRepresentingIcon(AlbumObjectImpl.java:2118)
at se.datadosen.jalbum.JThumbnailChooser.renderImage(JThumbnailChooser.java:141)
at se.datadosen.jalbum.JThumbnailChooser.lambda$setAlbumObject$0(JThumbnailChooser.java:122)
at org.netbeans.editor.WeakPropertyChangeSupport.firePropertyChange(WeakPropertyChangeSupport.java:99)
at se.datadosen.jalbum.AlbumObjectImpl.firePropertyChange(AlbumObjectImpl.java:2702)
at se.datadosen.jalbum.FileAlbumObject.setChildren(FileAlbumObject.java:149)
at se.datadosen.jalbum.AlbumObjectImpl.add(AlbumObjectImpl.java:2034)
at se.datadosen.jalbum.AlbumObjectImpl.add(AlbumObjectImpl.java:1933)
at se.datadosen.explorer.JExplorerPanel.handleFileAdd(JExplorerPanel.java:1216)
at se.datadosen.explorer.JExplorerPanel.lambda$drop$3(JExplorerPanel.java:819)
at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: Cannot open library: /var/folders/vc/1cnjqtpd5616hbyf_sh4l30c0000gn/T/libraw16396066549916796435.dylib
at java.base/java.lang.foreign.SymbolLookup.libraryLookup(Unknown Source)
at java.base/java.lang.foreign.SymbolLookup.libraryLookup(Unknown Source)
at net.jalbum.libraries.LookupService.libraryLookup(LookupService.java:60)
at net.jalbum.libraw4j.LibRaw_2.<clinit>(LibRaw_2.java:60)
... 29 more
|
|
|
Posts:
3,668
Registered:
18-Oct-2002
|
|
|
Re: Updated RAW file support for jAlbum
Posted:
8 Feb 25, 11:28
in response to: RobM
|
|
|
See attached screen grab, files in alphabetical order - there is no jlibraw-all.jar.
The closest is jlibraw-dummy.jar, which contains a file lib>darwin_universal.dylib
To be doubly sure I have the current version I download the latest version of jAlbum 37.0.6
Ah, you're on M-series Mac too, hence that dummy version. In that case, just remove the dummy file.
|
|
|
Posts:
3,668
Registered:
18-Oct-2002
|
|
|
Re: Updated RAW file support for jAlbum
Posted:
8 Feb 25, 11:34
in response to: RobM
|
|
|
@Rob,
The warning messages are known to me. I'll either just add that recommended switch to get rid of them or do the laborous task of modularizing jAlbum. That carries the promise of getting rid of those warnings.
The error you get is worse. The core error is Caused by: java.lang.IllegalArgumentException: Cannot open library: /var/folders/vc/1cnjqtpd5616hbyf_sh4l30c0000gn/T/libraw16396066549916796435.dylib
Question is why.
Run jAlbum again, and when you get the same error, DON'T close jAlbum, now open the Terminal window and issue:
file /var/folders/vc/1cnjqtpd5616hbyf_sh4l30c0000gn/T/libraw16396066549916796435.dylib
(Replace the path with whatever path the LAST error message reveals)
On my machine (an M-series Mac) I get: Mach-O 64-bit dynamically linked shared library arm64
The file should be 1144544 bytes long and has the following sha256 checksum: 25c6bcf6427372cf23ad8b4f119f47a0fedc849fef084338eb68029a97f9c4d0
|
|
|
Posts:
3,668
Registered:
18-Oct-2002
|
|
|
Re: Updated RAW file support for jAlbum
Posted:
8 Feb 25, 11:37
in response to: davidekholm
|
|
|
Also do a ls -l <path to .dylib file>
and check the file permissions. They should be -rwxr-xr-x
|
|
|
Posts:
3,668
Registered:
18-Oct-2002
|
|
|
Re: Updated RAW file support for jAlbum
Posted:
8 Feb 25, 11:38
in response to: davidekholm
|
|
|
Finally, open Preferences->Security and see if your Mac has blocked any file access.
|
|
|
Posts:
3,668
Registered:
18-Oct-2002
|
|
|
Re: Updated RAW file support for jAlbum
Posted:
8 Feb 25, 19:08
in response to: davidekholm
|
|
|
@Rob, I suspect that the library that isn't loading (actually libraw.dylib) is trying to load dependent libraries, for instance liblcms.dylib, that aren't present on your computer. What would explain why it works on my computer. I've now updated it to embed more embedded libraries. Please download jLibRaw2.jar to jAlbum's lib folder and retry!
Note, I've only updated the embedded library for M-series Mac computers. If this does the trick, then I shall update the other libraries for other platforms accordingly.
|
|
|
Posts:
3,967
Registered:
4-Aug-2006
|
|
|
Re: Updated RAW file support for jAlbum
Posted:
8 Feb 25, 21:48
in response to: davidekholm
|
|
|
Posting results of previous request first.
terminal path /var/folders/vc/1cnjqtpd5616hbyf_sh4l30c0000gn/T/libraw16396066549916796435.dylib: cannot open `/var/folders/vc/1cnjqtpd5616hbyf_sh4l30c0000gn/T/libraw16396066549916796435.dylib' (No such file or directory)
ls command
robert@Robert ~ % ls -l /Applications/jAlbum.app/Contents/app/lib/jLibRaw2.jar/native/macos64/aarch64/libraw.dylib
ls: /Applications/jAlbum.app/Contents/app/lib/jLibRaw2.jar/native/macos64/aarch64/libraw.dylib: Not a directory
Security
App store and known developers.
Will now download the modified jLibRaw2.jar
|
|
|
Posts:
3,967
Registered:
4-Aug-2006
|
|
|
Re: Updated RAW file support for jAlbum
Posted:
8 Feb 25, 21:56
in response to: RobM
|
|
|
With the new jLibRaw2.jar file on starting jAlbum with the empty project, or by loading a project, selected as default I get the Red triangle error alert (really does need bypassing).
WARNING: A restricted method in java.lang.foreign.SymbolLookup has been called
WARNING: java.lang.foreign.SymbolLookup::libraryLookup has been called by net.jalbum.libraries.LookupService in an unnamed module
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled
Skin loading: 0.409s
java.lang.IllegalArgumentException: Cannot open library: /var/folders/vc/1cnjqtpd5616hbyf_sh4l30c0000gn/T/libraw12880783497152743213.dylib
Dismissing the error a project without raw files loads ok
Loading the test raw file project fails, project not actually selected. Error message Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: Could not initialize class net.jalbum.libraw4j.LibRaw_1
at net.jalbum.jlibraw.LibRawImageReader.readInitial(LibRawImageReader.java:284)
at net.jalbum.jlibraw.LibRawImageReader.doReadThumbnail(LibRawImageReader.java:250)
at net.jalbum.jlibraw.LibRawImageReader.readThumbnail(LibRawImageReader.java:202)
at se.datadosen.jalbum.AlbumObjectImpl.readEmbeddedThumbnail(AlbumObjectImpl.java:2340)
at se.datadosen.jalbum.AlbumObjectImpl.doGetRepresentingIcon(AlbumObjectImpl.java:2247)
at se.datadosen.jalbum.AlbumObjectImpl.getRepresentingIcon(AlbumObjectImpl.java:2150)
at se.datadosen.jalbum.AlbumObjectImpl.getRepresentingIcon(AlbumObjectImpl.java:2118)
at se.datadosen.jalbum.JThumbnailChooser.renderImage(JThumbnailChooser.java:141)
at se.datadosen.jalbum.JThumbnailChooser.setAlbumObject(JThumbnailChooser.java:118)
at se.datadosen.jalbum.JGeneralSettingsPanel.setAlbumObject(JGeneralSettingsPanel.java:130)
at se.datadosen.jalbum.JSettingsWindow.setAlbumObject(JSettingsWindow.java:967)
at se.datadosen.explorer.JAlbumExplorer.setRootFolder(JAlbumExplorer.java:4070)
at se.datadosen.jalbum.JAlbumFrame.initView(JAlbumFrame.java:2431)
at se.datadosen.jalbum.JAlbumFrame.engine2UI(JAlbumFrame.java:2217)
at se.datadosen.jalbum.JAlbumFrame.engine2UI(JAlbumFrame.java:2175)
at se.datadosen.jalbum.JAlbumFrame.doLoadProject(JAlbumFrame.java:1914)
at se.datadosen.jalbum.JAlbumFrame.loadProject(JAlbumFrame.java:1837)
at se.datadosen.jalbum.JAlbumManager$JAlbumButton.lambda$actionPerformed$0(JAlbumManager.java:1241)
at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.ExceptionInInitializerError [in thread "Icon loader-thread-4"]
at net.jalbum.jlibraw.LibRawImageReader.readInitial(LibRawImageReader.java:284)
at net.jalbum.jlibraw.LibRawImageReader.doReadThumbnail(LibRawImageReader.java:250)
at net.jalbum.jlibraw.LibRawImageReader.readThumbnail(LibRawImageReader.java:202)
at se.datadosen.jalbum.AlbumObjectImpl.readEmbeddedThumbnail(AlbumObjectImpl.java:2340)
at se.datadosen.jalbum.AlbumObjectImpl.doGetRepresentingIcon(AlbumObjectImpl.java:2247)
at se.datadosen.jalbum.AlbumObjectImpl.getRepresentingIcon(AlbumObjectImpl.java:2150)
at se.datadosen.jalbum.AlbumProject.getRetinaIcon(AlbumProject.java:133)
at se.datadosen.jalbum.AlbumProject.loadIcon(AlbumProject.java:167)
at se.datadosen.jalbum.AlbumProject.lambda$forIcon$1(AlbumProject.java:148)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Edited by: RobM on 8 Feb 2025, 20:57
|
|
|
Posts:
3,668
Registered:
18-Oct-2002
|
|
|
Re: Updated RAW file support for jAlbum
Posted:
8 Feb 25, 23:52
in response to: RobM
|
|
|
Odd. Are you on an M-series (Apple Silicon) Mac?
Do you see any messages of blocked access within Apples PreferencesSecurity?
|
|
|
Posts:
3,967
Registered:
4-Aug-2006
|
|
|
Re: Updated RAW file support for jAlbum
Posted:
9 Feb 25, 00:56
in response to: davidekholm
|
|
|
I'm using an Apple MacBook Air, M2 chip, os version 15.3.
Model Identifier: Mac14,15
Model Number: MQKX3B/A
Total Number of Cores: 8 (4 performance and 4 efficiency)
Memory: 8 GB
System Firmware Version: 11881.81.2
OS Loader Version: 11881.81.2
Apple System Settings > Privacy & Security > Security >
Allow applications from App store & known developers,
No messages, but there is no panel for messages and I haven't seen any pop-up messages.
|
|
|
Posts:
3,668
Registered:
18-Oct-2002
|
|
|
Re: Updated RAW file support for jAlbum
Posted:
9 Feb 25, 10:51
in response to: RobM
|
|
|
@Rob, can you please check if you have these files installed:
/opt/local/lib/libz.1.dylib
/usr/lib/libSystem.B.dylib
/usr/lib/libc++.1.dylib
They are all needed by the library.
(just do a ls -l /opt/local/lib/libz.1.dylib )
|
|
|
|
Legend
|
|
Forum admins
|
|
Helpful Answer
|
|
Correct Answer
|
|