is_photo()) { $input_file = $item->file_path(); $output_file = system::temp_filename("rawphoto-", "jpg"); $success = rawphoto_graphics::convert($input_file, $output_file); if ($success) { $item->set_data_file($output_file); $item->save(); unlink($output_file); } } } static function admin_menu($menu, $theme) { $menu->get("settings_menu") ->append(Menu::factory("link") ->id("rawphoto") ->label(t("Raw Photos")) ->url(url::site("admin/rawphoto"))); } static function legal_photo_extensions($extensions_wrapper) { array_push($extensions_wrapper->extensions, "bay", "bmq", "cr2", "crw", "cs1", "dc2", "dcr", "dng", "fff", "k25", "kdc", "mos", "mrw", "nef", "orf", "pef", "raf", "raw", "rdc", "srf", "x3f"); } static function legal_photo_types($types_wrapper) { array_push($types_wrapper->types, "image/tiff"); } static function graphics_toolkit_change($toolkit_id) { rawphoto_graphics::report_ppm_support($toolkit_id); } }