-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTODO
339 lines (228 loc) · 13.4 KB
/
TODO
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
Make hunting for Argyll executables more robust. Perhaps allow the executable name to be changed...
Use a more sensible error message if the user attempts to convert a CMYK image through an RGB -> CMYK devicelink.
Problem with exceptions if you disable embedded profiles then convert a CMYK image with no fallback profile.
| Need an icon for greyscale images!
| Save dialog needs to allow 16-bit, 8-bit, and 8-bit dithered.
Problem with rendering icons for images with alpha channel?
Replace spinners wth GTK inbuilt ones.
DeviceLink editor needs to be split into tabs. (or maybe dividers?)
First tab: ("Basic")
Input
Output
Rendering intent
Ink limit
Name
Second tab: ("Viewing conditions")
Input viewing conditions
| (Viewing condition selector needs "default" options with which no parameters are passed to Argyll.)
Output viewing conditions
Third tab: ("Black Generation")
Black Generation
Ink Limit
Argyll Spectrum selector
Should provide a combo with the built-in illuminants first, then search an Argyll ref path for .sp files.
Finally, should have a "custom" option.
Beneath the notebook we should have buttons as follows:
[Generate...]
| [Export...] (Must solve issue with -D first!)
| Need some kind of global activity indicator - something to monitor the jobqueue.
| Clicking on this should bring up a list of pending jobs, which means the jobs should have meaningful names.
Actually settled on making the overall progress indicator cycle between the names of the active jobs.
Can we give each progress a queryable percentage so the activity indicator can show a global complete percentage?
Add Postscript Import - recognise PS/PDF by extension when adding a file, and pop up an options dialog.
Need to decide how to handle temporary files. Maybe a dialog when CMYKTool quits asking whether
auto-generated files should be removed? Or just a checkbox on the import dialog?
Need the following options:
Output filename prefix: [ /path/to/file ] _nnn.tif
Add some kind of mask capability.
Import mask from external file
Mask editor?
Add some kind of node-based editor for defining operations.
The trickiest part will be having some way for nodes further down the chain to communicate
how many "support" rows they need. Maybe add a static function to the ImageSource
| Add icons for devicelink list
| Export resolution broken?
| Fix searchpath bug which is prepending "\" to each path
| Problem with fetching userdir when usename is unicode only happens from
| within mingw shell - so don't worry about it.
UTF8 filename handling needed for:
Image loaders
| ImageSource_JPEG
| ImageSource_PNM
ImageSource_BMP - uses fstream
ImageSource_GS - needs replacing with PSRip-based solution.
| ImageSource_TIFF - use TIFFOpenW
Image Savers
| TIFFSaver: Use TIFFOpenW
| JPEGSaver
| ConfigDB
| SearchPaths - can use wopendir and wreaddir, along with conversion to UTF8
| dirtreewalker
|generaldialogs.cpp
Consumer
| ProfileManager / LCMSWrapper - Load profile into RAM rather than opening from disk
| util.cpp
| debug.cpp - log files?
externalprogram - will Unicode parameters even work, or will filenames parameters need to be
converted to code page?
| Make Win32 externalprogram escape arguments with spaces in
| Add ability to export a devicelink for use in other programs.
| Place the "display name" for the devicelink in the argyll command line - must escape it though.
When the user selects a preset from the preset editor then clicks OK,
the main window's combo should be set to that preset
| Add "Select All" and "Select None" features to the ImageSelector.
| Make devicelink generation a background task
| Set up some kind of event to be triggered when a job finishes.
| Mark the devicelink metadata file as "pending" while it's being generated, and "done" when it's complete.
| Make ArgyllPath available to devicelink generation.
| Make DeviceLink dialog return name of chosen devicelink.
| If the user quits the devicelink dialog without generating a devicelink, prompt.
(Could compare the settings against the current list and only prompt if there's no match...)
| When generating a devicelink complain if there's already one with the current name
If the user tries to use a devicelink that's not yet generated, complain.
| Sort out proofing of devicelinked images - currently resembles "inspect" mode.
| Add proper support for greyscale images and profiles.
| Fix issue with X libs not being linked on some platforms
| Need to be able to remove images from the left hand tray.
| Add newly-created presets to the preset list.
| Need some kind of preset manager - will show a list of presets, and allow them to be edited or deleted.
Dialog should have a list of presets on the left hand side, each with an icon to show the source and dest spaces,
and preferably the conversion mode too.
Need icons for:
Straight RGB -> CMYK
Hold Black
Hold Grey
Overprint
DeviceLink
| On the right hand pane, the editor needs to have
| Preset Name
| Mark out a group, called "Input"
| Fallback RGB Profile
| Fallback CMYK Profile
| Ignore embedded profiles
| Mark out a group, called "Output"
| Output profile
| Rendering intent
| Mark out a group called "Processing"
| Use Devicelink checkbox, and list of devicelinks
| Update the list automatically from input/output profile and rendering intent.
| (What about files with embedded profiles? Convert to DL input space first?)
| Conversion mode
| Transition width
| Need to have two levels of DeviceLink selector:
| Combo box from which a compatible DL can be selected, plus "Other...", which will pop up a:
| Dialog, containing a listview of all DeviceLinks known to the system, with a button to create a new one.
| Add support for creatng DeviceLinks.
| Cache them in cmyktool/devicelinks, and store them using random filenames, and a metadata file
| alongside each one.
| (Need to place a description in the collink "-D" parameter. Build automatically from source/dest profiles?)
| Need to maintain a list of available devicelinks, which will be made available in the conversionoptsdialog.
| The devicelinks are defined by:
| * Source Profile
| * Destination Profile
| * Rendering Intent
| * Black Generation
| * Viewing conditions
| Also need a "Description" field.
Preserve clipping paths, as per latest Separate+
Means we need to carry around binary blobs with the ImageSource (more refcounted pointers?)
The tag to fetch and store is TIFFTAG_PHOTOSHOP. Maybe also carry around EXIF and XML data? Though these may
well be invalidated by converting the image.
There is a similar tag (or APP marker) for JPEGs, too, it seems.
| Since we need to call both Argyll utilities and GhostScript, need to create a better solution
| for calling command-line programs.
| Add a "Width" parameter to the "Hold Grey" code which will cause near-greys to be modified in an
| interpolated fashion between the output of the CMS transform and the pure grey pixel value.
| (This could be useful for hold black mode, too.)
|Add DuoTone capability (probably better handled with a separate utility) which would allow
|you to set an approximate tone for a spot colour, and have a duotone image calculated.
|Would work by finding a CMYK approximation for that colour, then building a 2D lookup-table
|using the CMYK profile.
| Add ability to perform a "naive" RGB->CMYK conversion with no profiles.
Solve problem with UTF-8 filenames on Win32.
Need to use wide version of fopen - which unfortunately means avoiding the use of ifstream.
(Perhaps implement an equivalent?)
Use a variant of fdstream.hpp?
Need to convert from UTF-8 to UTF-16 wchar_t... (Is glib going to be the easiest way, or can we avoid that dependency?)
| Add support for saving CMYK JPEGs.
| Why is resolution being saved just fine for RGB JPEGs but not for CMYK ones?
| (Because JFIF doesn't support CMYK, so we'd need to save a proper Adobe header with the resolution
| encoded differently. For now we simply write a JFIF header despite the colourspace not officially being
| supported)
| Need to change the preset combo's position - it currently causes the image list to expand...
| (Solved by limiting the number of characters displayed from the preset's name)
| Add a chain-link widget to the head of each tab. Then toggling zoom or panning pixbufview will affect
| all tabs with the link set.
| Use a separate fallback RGB and CMYK profile in the conversionopts. This should solve the issue with devicelinks.
| Add "Ignore embedded profile" checkbox.
| Add ability to read coordinates to pixbufview.
| Figure out how to display colorant percentages?
| Perhaps move the display of the colorant blobs away from pixbufs to Cairo rendering, then draw the text on top?
Menus:
File -> Open...
File -> Quit
Image -> Add Images...
Image -> Remove Images
Colour -> Colour Management Options...
Colour -> Create DeviceLink profile...
Edit -> Preferences...
Need to be able to set the source profile and other details conveniently. (Including overriding
an embedded profile, if present.)
| Needs to be able to store conversion presets. The presets will have names, and be presented in a "SimpleCombo":
|These options will be saved in $XDG_CONFIG_HOME/cmyktool/
|On startup this directory will be scanned, and each file loaded in turn into a dummy ConfigDB
|from which the description will be extracted.
|(Can SimpleComboOption be changed so instead of a static array it builds a list?)
| Need a "core" object which will contain paths for colour profiles and other miscellaneous settings.
| and a dialog for setting core options.
| Also need a ConversionOptions object - something which can be passed around and copied.
| Need a better solution for the channel selectors - maybe a row of togglebuttons each with the squiggle icon
| in a different colour. - or maybe checkboxes with a coloured squiggle as a label? (Settled on checkboxes
| with smaller blobs as labels.)
| Also needs to support converting from CMYK to RGB.
| Need to improve support for GhostScript backend. Colourspace can be set using the input profile's colourspace.
| Temp files? Lifetimes? Multiple pages?
Need to separate rendering and temp file tracking.
| Need an ImageBuffer of some kind - something that can hold an image for further processing.
| Need to support multi-selection in the ImageSelector!
-------------------------------------
PSRip
Tool needs to allow a PS File to be dragged and dropped, or selected from a menu. When a PS file is opened, a dialog
will pop up asking for RIP options - which amounts to:
* B/w, Grey, RGB or CMYK rendering.
* Resolution
* Text anti-aliasing (generally turned off) -dTextAlphaBits=4
* Graphics anti-aliasing (generally turned on) -dGraphicsAlphaBits=4
------------------------------------------
| Need to consider thread pooling. If you select a dozen images at once, you don't want to be running them all simultaneously.
| Perhaps some mutex-variation which uses a counter, similar to the RWMutex - would allow n threads to hold it at once,
| but make any further threads wait until the counter had diminished again. (Multex)
| Better would be a work queue, and a small number of worker threads.
| Better, track worker threads and re-use them. Requires message passing mechanism. ThreadEvents? (Used Mutexes)
| Make SearchPath thread-safe. (Needs a perseparate iterator which tracks open directories.)
| Need a way of handling job deletion - needs to be tracked by the UITab, but has to be able to self-delete, too.
| Will have to be mutex-protected. Reference counting?
| The scenario that causes the problem is this:
| If the main thread queues a job A, which references object B, it's possible for the main thread to delete
| B before job A is run, and there's no way, currently, of robustly cancelling job A.
| The most elegant solution to this is probably to build a second queue, so there's a waiting and a running queue, then
| provide a Cancel() method to the jobdispatcher which takes a Job pointer as an argument.
| The dispatcher will then search both queues, and if found, delete the job. If the job is not found in either queue, then
| it's either finished and self-destructed, or about to be so.
| Needs to be possible to interrupt redraw if the selected colorants changes.
--------------------
| Error message handling
| Needs to be some way of propogating error messages to the main thread for display to the user.
| It's not safe on Win32 for subthreads to pop up dialogs, so such a task must be deferred to the main
| thread by means of an idle/timeout handler.
| Need to maintain a queue of error messages. It should be possible to merge them into a single message and display
| them in a single dialog - adding them to an existing dialog if it's open.
| Error message display code will be implemented as a global instance which will be informed of the top-level window
| when the program initializes - thus eliminating the need to pass around a parent window handle.
| Add support to pixbufview for page flipping. This will allow imagetarget functionality to be folded into cmyktool.
| (Would use "normal", "normal proof" and "devicelink" optiosn on a combo, so they could be swapped with the mousewheel.)
| Will need to store a list of pixbufs, and have support for setting a page number.
| pixbufview_set_image() will clear the image list, and set the provided image as a first page.
| pixbufview_add_page(PixbufView *pb,GdkPixbuf *pb);
| pixbufview_set_page(PixbufView *pb,int page);
| pixbufview_clear_pages(PixbufView *pb);