-
Notifications
You must be signed in to change notification settings - Fork 1
/
NOTES
354 lines (236 loc) · 12.6 KB
/
NOTES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
-*- indented-text -*-
Issues
======
1. Sort by X
- In library items: sort subitems by name, date, etc.
- In image list view: sort images by name, date, etc. [done]
Both kinds of sorting should persist across restarts.
2. Dragging library items
- Dragging a top-level item should move it in the view.
- Dragging a subfolder should move it in the file system.
- Dragging images into folders should copy/move the images.
- Dragging images into albums should add them to the album.
- Dragging images from albums can either copy/move them to another
album, or to a different folder.
Note the latter may be confusing: you can drag an image from an album
(collection of images from many physical locations) to a folder,
which moves the image out of its original folder, even though that's
not where it was dragged from!
MOSTLY RESOLVED: implemented. But file copies are currently done on
the main thread, which needs to change.
3. Renaming library items by editing their name
- Top level items or albums just change their displayed name
- Items backed by directories rename the directory.
RESOLVED: implemented.
4. Allow image metadata to be edited
- Title, caption, copyright, keywords etc. [done, in inspector]
- Dedicated tagging/keywording UI? (Panel showing tag list, with
those that are applied sorted forwards and highlighted?)
- Edit orientation state for simple rotation support. [done]
5. Overlay metadata badges in image view
- Ratings etc..
RESOLVED: implemented (to match thumbnails).
6. Command to select RAW vs JPEG source file
PARTIALLY RESOLVED: added the command, everything updates and caches
correctly. But decoding full-size RAW data on the fly is too slow to
be useful. Will probably need to cache a full-size "developed" image,
and work from that. But the devil is in the details (depth, color
space, compression, etc..)
7. Custom image list filters
Normal "build a query" style UI (use NSPredicate and its editor).
RESOLVED: implemented. But may create a better editing UI later,
NSPredicateEditor is somewhat clunky.
8. Save filters/queries as smart folders in source list
The position of the filter item in the library hierarchy controls
what it filters. E.g. top-level == filter everything, subitem of a
directory == only filter that directory.
Once created, selecting the smart folder item activates the
associated image list and predicate. Opening the predicate editor
shows the current filter, but editing the predicate doesn't
immediately commit the changes back to the smart folder. Only once
the OK button has been clicked will the smart folder's permanent
state be updated, cancelling returns it to the original state.
MOSTLY RESOLVED: added top-level albums (aka smart folders) that
filter the complete set of images. But currently no way to drag
beneath a folder to filter only that directory, or to edit the folder
query after adding it.
9. "Preview" mode where the fullsize image isn't loaded?
Would definitely be useful for RAW images right now :-( Could also
have a preview mode where RAW images display their JPEG twin?
10. Viewer should be able to display multiple images?
As an option? Useful for comparing similar images.. or does it just
make the images too small to be useful? Perhaps a way of quickly
flipping through the selection like a stack of cards? (With a
view-all mode for selecting?)
10. Image groups (aka stacks)
- Allow multiple images to be grouped
- The stack can be reordered, the first is used by default
- Stacks can be expanded to show all images, or collapsed
- Command to create stacks based on time brackets?
11. Duplicate an image
- i.e. create a new meta file referencing the same master image(s)
- not too useful yet, but will be later, e.g. multiple crops of the
same image
12. Archive volumes
Mark a directory as the "archive" of a library root. Then:
- command to move unused files (RAW vs JPEG etc) to the archive,
- may also copy used files into the archive, for completeness.
After moving the assets around need to create valid metadata in the
archive location, and update the metadata in the master to add a
reference to the "missing" file, probably its name and hash, so that
it can be found when needed. (The metadata already lists the kinds
of files that are available, but it may not be saved.)
13. Trashed images
Add a deleted property to the image, set it when the image is
"deleted". Add a "Trash" meta-folder to show all deleted images.
Also add an "Empty Trash" command.
MOSTLY RESOLVED: need to support dragging into and out of the trash
folder.
14. Libraries and caching
Even though startup asynchronously loads images, it takes long enough
to be annoying. The bulk of the time is sucking the metadata out of
each image, ImageIO parsing it and then us converting it to our own
format.
Adding a basic cache of parsed properties helps this, but to make the
cache fast enough it can only index on base-name, size and mtime of
each file, which is fragile. And it's going to be hard to GC items
out of the cache when images are deleted.
So we need something less ad hoc. It's perhaps time to formalize the
"image library" concept, along the lines of:
- each library has a host-unique id (32-bit token), and a persistent
catalog associated with it
- the catalog maps relative-path -> file-id
- file-id is a 32-bit token of some kind, unique to the library
- arrange proxy and property caches relative to library root, both
stored in file system. File names are made from library and image ids
- can't store library or file ids in the .phod file -- rsyncing the
file to another host or library would leave it in an invalid state.
- deleting a library purges its cached state. (If we format the
library's cache as its own subdirectory, we can delete it wholesale.)
- after startup is complete, GC files from each mounted library that
no longer exist (and aren't marked archived)
- no more use of partial hashes to cache files. If files move, we
regenerate the cache. If an old file is replaced, its mtime had
better get updated!
RESOLVED: implemented this, and using it to cache image properties.
15. Color tint change when switching from proxy to full-size
Possibly because proxies are matched to sRGB? (This means they're
also downsampled in the sRGB space, but it's more likely to be a
gamut clipping issue? Greens seem to be the worst.)
16. Import from folder
Import from DCIM volume is mostly implemented. Need to decide how to
handle importing from normal directories of images. E.g. should we
just require them to be added as libraries, then copied from? And if
so, do we still need to allow all the import options (RAW+JPEG etc)
17. Albums don't update image names that change
LibraryViewController should listen for a notification and do this.
RESOLVED: PDImageName no longer uses name property, images in albums
are given a UUID.
18. Import image remaining is not implemented.
19. Support storing metadata external to the image directories?
Currently we write out a .phod-suffixed file with a JSON-encoded
dictionary after generating any metadata that wouldn't be reproduced
by reloading the original file(s). This has advantages (e.g. easy for
user to move the metadata along with the images), but some people may
want it stored somewhere else..
20. Support libraries on removable volumes
Separate from archiving (described above, which also needs to track
volume mount/unmount), we should support libraries whose root is on
a removable mount-point. When unmounted we should show the root item
greyed out (preserving the outline view state from the last time it
was seen), and its catalog is not garbage-collected.
21. Image adjustments / filters
See discussion below.
22. Bad experience when marking a viewed image rejected
Unless rejected images are currently being shown, it disappears
leaving a grey screen. It also loses the selection position. We
should stay viewing that image until it's no longer selected, at
which point it disappears?
PARTIALLY RESOLVED: implemented. A bit skanky, but seems to work
correctly.
Except there's the same problem when viewing the rejected folder and
clearing an image's rejected status -- it disappears immediately.
Also, the hidden state also has the same wrong behavior.
23. Commands (with key equivs) to navigate library view
E.g. while content area is first responder. Use Command-Cursor keys?
Left/right follows current expansion state, Up finds parent, Down
steps into first child, opening the folder if necessary.
RESOLVED: implemented.
24. Library view doesn't scroll as selection moves offscreen
Could be a PXSourceList bug?
RESOLVED: we now scroll to the selection rect when told the selection
has changed.
25. PTP import
E.g. direct import from iOS devices.
Should be able to use ImageCaptureCore framework? Will need a way to
display images without having any files, just the thumbnail, that
doesn't currently fit our PDImage model so may need some hacking..
..it looks like it should be feasible to split each of PDImageLibrary
and PDImage into a generic base class and two subclasses, one for
file-based libraries, one for PTP libraries. Most of the more
esoteric methods on both classes are only used internally or by the
other class.
26. Removing a library may not entirely delete its cache
E.g. if its images are still prefetching they will write themselves
to disk recreating the cache directory that was just deleted.
Not a massive problem, they'll be cleaned up the next time the app is
launched.
27. Import controller's default title date is wrong
Instead of today's date, use the date of the earliest photo to be
imported.
28. Delete after import deletes files but doesn't update UI
29. Add command to create new folder in library
RESOLVED: implemented.
30. No way to delete library folders
Easy if they're empty. What if they still contain images?
31. Update libraries when the app is brought back frontmost
PARTIALLY RESOLVED: added a command to manually rescan all library
directories. Doing this implicitly can be slow and expensive, though
it could be moved onto an async queue? (and for some reason currently
causes a flicker in the image-list view)
Image Adjustments
=================
Requires gutting the current image display "architecture", although the
thumbnail views might survive largely unchanged.
Could do a prototype using Core Image, or more likely OpenCL, but the
substrate is not really the problem. Various thoughts:
- the adjustment filters I actually care about are mostly quite simple,
the normal list is:
- straighten & crop
- white balance
- exposure (normally RAW only)
- saturation and contrast
- black and white
- levels?
- highlights and shadows?
- chromatic aberration (RAW only)
of those only the geometric transforms and the last two have a kernel
extent that isn't limited to the destination pixel. Straighten, crop
and white-balance are the only ones I really miss.
- some filters (e.g. unsharp mask) should always run on the full-size
image, whereas most can run on proxies without losing anything.
- standard optimizations: concatenate all color matrices, concatenate
all geometry matrices (mat3x3, devolve to mat2x2 + tx when possible).
- standard order of operations. Geometry (minus proxy scale) is last?
- these are photos, so would be good to be correct. E.g. would like to
do all image scaling in a linear color space. This would also require
not using CG to generate the existing proxy images.
- do we need 16-bit components, or can we do something creative with
the last 8-bits of each RGBA32 pixel? RGBM or something? But these all
prevent you interpolating the 8888 pixels directly. (Though so does
having non-linear color, and we ignore that..)
GL has EXT_texture_shared_exponent, but it's not renderable.
ARB_texture_rgb10_a2ui does claim to be renderable, so might be an
option? Would need to be sure 10 bits is enough, it not be. Perhaps
operate in linear 16-bit internally, and convert to non-linear 10-bit
when caching?
- color matching? Don't have access to the CG magic. Would probably
have to get the ICC profiles and do the rest by hand, it's not hard,
just tedious. Can use littlecms for some of it?
- tiles? Main benefit would be when zoomed in and not displaying the
entire image.
- how do we connect the output of the last processing stage to the
layer? GL layer is probably the most obvious way. But there may be
others..
- a large part of me wants to dump OpenGL. So perhaps do CL-CPU as
first option, and CL-GPU later if necessary..