From: Bjoern Geuken <bgeuken@suse.de>
Date: Mon, 14 Oct 2013 13:10:40 +0200 Subject: [PATCH 3/3] Don't increment / decrement value of resolution git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14569 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
@@ -397,18 +397,10 @@ int pslr_set_jpeg_quality(pslr_handle_t h, pslr_jpeg_quality_t quality)
|
||||
|
||||
int pslr_set_jpeg_resolution(pslr_handle_t h, int resolution)
|
||||
{
|
||||
int hwres;
|
||||
ipslr_handle_t *p = (ipslr_handle_t *) h;
|
||||
if (resolution >= PSLR_MAX_RESOLUTIONS)
|
||||
return PSLR_PARAM;
|
||||
if (is_k20d(p) || is_k30(p))
|
||||
{
|
||||
hwres = resolution;
|
||||
}
|
||||
else
|
||||
{
|
||||
hwres = resolution-1;
|
||||
}
|
||||
|
||||
CHECK(ipslr_cmd_00_09(p, 1));
|
||||
CHECK(ipslr_write_args(p, 2, 1, hwres));
|
||||
CHECK(command(p, 0x18, 0x14, 0x08));
|
||||
@@ -815,7 +807,7 @@ static int ipslr_status_full(ipslr_handle_t *p, pslr_status *status)
|
||||
status->set_shutter_speed.nom = get_uint32(&buf[0x2c]);
|
||||
status->set_shutter_speed.denom = get_uint32(&buf[0x30]);
|
||||
status->set_iso = get_uint32(&buf[0x60]);
|
||||
status->jpeg_resolution = 1+get_uint32(&buf[0x7c]);
|
||||
status->jpeg_resolution = get_uint32(&buf[0x7c]);
|
||||
status->jpeg_contrast = get_uint32(&buf[0x94]);
|
||||
status->jpeg_sharpness = get_uint32(&buf[0x90]);
|
||||
status->jpeg_saturation = get_uint32(&buf[0x8c]);
|
||||
|
||||
Reference in New Issue
Block a user