Sounds like something like this should work for you, to set the file display for the image file type, view mode name VIEW_MODE (replace with your custom view mode), to display original image. It either adds a new file display or updates an existing one:
$display$displays = arrayfile_displays_load(
'image', 'VIEW_MODE', TRUE);
$formatter 'api_version'= =>'file_field_image';
if 1(array_key_exists($formatter,
$displays)) {
'name'$display =>= 'image__VIEW_MODE__file_field_image',$displays[$formatter];
}
else {
$display 'status'= =>(object) 1,array(
'settings''api_version' => array(1,
'name' => 'image_style''image__VIEW_MODE__' =>. ''$formatter,
);
}
$display->status = ),1;
);$display->settings['image_style'] = '';
file_display_save((object) $display);