259
// Development mode of a RAW photo.
260
public enum RawDeveloper {
261
SHOTWELL = 0, // Developed internally by Shotwell
262
CAMERA, // JPEG from RAW+JPEG pair (if available)
263
EMBEDDED; // Largest-size
265
public static RawDeveloper[] as_array() {
266
return { SHOTWELL, CAMERA, EMBEDDED };
269
public string to_string() {
278
assert_not_reached();
282
public static RawDeveloper from_string(string value) {
291
assert_not_reached();
295
public string get_label() {
298
return _("Shotwell");
303
assert_not_reached();
307
// Creates a backing JPEG.
308
// raw_filepath is the full path of the imported RAW file.
309
public BackingPhotoRow create_backing_row_for_development(string raw_filepath) throws Error {
310
BackingPhotoRow ns = new BackingPhotoRow();
311
File master = File.new_for_path(raw_filepath);
313
disassemble_filename(master.get_basename(), out name, out ext);
315
string basename = name + "_" + ext + (this != CAMERA ? ("_" + this.to_string().down()) : "")
318
File? new_back = generate_unique_file(master.get_parent(), basename, out c);
319
claim_file(new_back);
320
ns.file_format = PhotoFileFormat.JFIF;
321
ns.filepath = new_back.get_path();