Skip to content

Support displaying high dynamic range images, #26 #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,6 @@ fastlane/test_output
iOSInjectionProject/
## Gcc Patch
/*.gcno

# macOS Finder Desktop Services Store files
**/.DS_Store
191 changes: 142 additions & 49 deletions JXLook.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion JXLook.xcodeproj/xcshareddata/xcschemes/JXLook.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1220"
LastUpgradeVersion = "1430"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
26 changes: 19 additions & 7 deletions JXLook/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,32 @@
//

import Cocoa
import os

@main
class AppDelegate: NSObject, NSApplicationDelegate {



func applicationDidFinishLaunching(_ aNotification: Notification) {
// Insert code here to initialize your application
Settings.shared.registerDefaults()
}

func applicationWillFinishLaunching(_ notification: Notification) {
if let dictionary = Bundle.main.infoDictionary {
if let version = dictionary["CFBundleShortVersionString"] as? String,
let build = dictionary["CFBundleVersion"] as? String {
os_log("JXLook %{public}@", log: .view, type: .info, "\(version) (\(build))")
}
if let copyright = dictionary["NSHumanReadableCopyright"] as? String {
os_log("%{public}@", log: .view, type: .info, copyright)
}
}
os_log("Using libjxl %{public}@", log: .view, type: .info,
"v\(JPEGXL_MAJOR_VERSION).\(JPEGXL_MINOR_VERSION).\(JPEGXL_PATCH_VERSION)")
os_log("Running under macOS %{public}@", log: .view, type: .info,
ProcessInfo.processInfo.operatingSystemVersionString)
}

func applicationWillTerminate(_ aNotification: Notification) {
// Insert code here to tear down your application
os_log("Terminating", log: .view, type: .info)
}


}

60 changes: 41 additions & 19 deletions JXLook/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="17506" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17506"/>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand All @@ -28,7 +29,11 @@
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
<menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW"/>
<menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW">
<connections>
<segue destination="Nja-BR-Dbe" kind="show" id="F0q-aP-mbi"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/>
<menuItem title="Services" id="NMo-om-nkz">
<modifierMask key="keyEquivalentModifierMask"/>
Expand Down Expand Up @@ -727,46 +732,63 @@
<rect key="frame" x="0.0" y="0.0" width="480" height="270"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<scrollView horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" allowsMagnification="YES" maxMagnification="40" minMagnification="0.01" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hza-MG-db3">
<scrollView horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" allowsMagnification="YES" maxMagnification="40" minMagnification="0.01" usesPredominantAxisScrolling="NO" horizontalScrollElasticity="none" verticalScrollElasticity="none" translatesAutoresizingMaskIntoConstraints="NO" id="uk3-Mk-5Tc" userLabel="Scroll View">
<rect key="frame" x="0.0" y="0.0" width="480" height="270"/>
<clipView key="contentView" id="Bk8-bN-JcH" customClass="CenterClipView" customModule="JXLook" customModuleProvider="target">
<clipView key="contentView" id="brl-ux-NhH" customClass="CenterClipView" customModule="JXLook" customModuleProvider="target">
<rect key="frame" x="1" y="1" width="478" height="268"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="mxC-UZ-FxQ">
<rect key="frame" x="0.0" y="-2" width="480" height="270"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" animates="YES" imageScaling="proportionallyUpOrDown" id="qcU-ch-5KV"/>
</imageView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="uVJ-Dd-6IW" userLabel="Metal View" customClass="MetalImageView" customModule="JXLook" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="480" height="270"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="mxC-UZ-FxQ">
<rect key="frame" x="0.0" y="0.0" width="480" height="270"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" animates="YES" imageScaling="proportionallyUpOrDown" id="qcU-ch-5KV"/>
</imageView>
</subviews>
<connections>
<outlet property="imageView" destination="mxC-UZ-FxQ" id="q8D-5q-vps"/>
</connections>
</customView>
</subviews>
<color key="backgroundColor" red="0.62882173060000002" green="0.6251477003" blue="0.62501531840000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</clipView>
<scroller key="horizontalScroller" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="JaZ-Ha-VZ6">
<scroller key="horizontalScroller" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="fgN-BG-9Z2">
<rect key="frame" x="1" y="253" width="478" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="qOe-g1-y4E">
<scroller key="verticalScroller" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="hBR-g2-Jr5">
<rect key="frame" x="463" y="1" width="16" height="268"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
</scrollView>
</subviews>
<constraints>
<constraint firstItem="hza-MG-db3" firstAttribute="leading" secondItem="ERx-hH-rdd" secondAttribute="leading" id="mfz-ma-N1z"/>
<constraint firstAttribute="bottom" secondItem="hza-MG-db3" secondAttribute="bottom" id="mga-XU-ODG"/>
<constraint firstItem="hza-MG-db3" firstAttribute="top" secondItem="ERx-hH-rdd" secondAttribute="top" id="nBk-Np-inj"/>
<constraint firstAttribute="trailing" secondItem="hza-MG-db3" secondAttribute="trailing" id="tSB-GU-gji"/>
<constraint firstItem="uk3-Mk-5Tc" firstAttribute="leading" secondItem="ERx-hH-rdd" secondAttribute="leading" id="CFK-qy-Gqb"/>
<constraint firstItem="uk3-Mk-5Tc" firstAttribute="top" secondItem="ERx-hH-rdd" secondAttribute="top" id="FwC-JF-zqZ"/>
<constraint firstAttribute="trailing" secondItem="uk3-Mk-5Tc" secondAttribute="trailing" id="Wf7-fU-N79"/>
<constraint firstAttribute="bottom" secondItem="uk3-Mk-5Tc" secondAttribute="bottom" id="o9E-vk-Kht"/>
</constraints>
</view>
<connections>
<outlet property="clipView" destination="Bk8-bN-JcH" id="xou-WW-SV4"/>
<outlet property="imageView" destination="mxC-UZ-FxQ" id="CVH-nb-DYB"/>
<outlet property="scrollView" destination="hza-MG-db3" id="ISY-98-hxR"/>
<outlet property="clipView" destination="brl-ux-NhH" id="2M0-ts-0cA"/>
<outlet property="imageView" destination="uVJ-Dd-6IW" id="tGC-Rb-Oim"/>
<outlet property="scrollView" destination="uk3-Mk-5Tc" id="ktz-uy-TJl"/>
</connections>
</viewController>
<customObject id="2Tp-Fl-jBw" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="75" y="655"/>
</scene>
<!--SettingsWindow-->
<scene sceneID="bQh-sL-0Vf">
<objects>
<controllerPlaceholder storyboardIdentifier="SettingsWindow" storyboardName="Settings" referencedIdentifier="SettingsWindow" id="Nja-BR-Dbe" sceneMemberID="viewController"/>
<customObject id="AcM-l8-Jza" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="74" y="1062"/>
</scene>
</scenes>
</document>
Loading