Commit b1e497e7 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

EXIF fixes by reald (closes #80)

commit 9c8226a1
Merge: e4483e5e 132ecc0f
Author: Dennis Real <github@tildepipe.org>
Date:   Sun Feb 5 17:24:17 2012 +0100

    Merge branch 'master' of ssh://github.com/reald/feh

commit e4483e5e
Author: Dennis Real <github@tildepipe.org>
Date:   Sun Feb 5 16:56:29 2012 +0100

    - improved handling of images which have exif tags but not ours
    - fixed uninitialized pointer in thumbnail mode
    - added nikon lens info if available

commit 132ecc0f
Author: Dennis Real <github@tildepipe.org>
Date:   Sun Feb 5 16:56:29 2012 +0100

    - improved handling of images which have exif tags but not ours
    - fixed uninitialzed pointer in thumbnail mode
    - added nikon lens info if available
parent 0d7602ff
Loading
Loading
Loading
Loading
+1 −0
Changes for .gitignore: 1 added line, 0 removed lines.
Original line number Original line Diff line number Diff line
@@ -3,3 +3,4 @@
/src/*.inc
/src/*.inc
/src/feh
/src/feh
/man/*.1
/man/*.1
*~
 No newline at end of file
+4 −2
Changes for src/exif.c: 4 added lines, 2 removed lines.
Original line number Original line Diff line number Diff line
@@ -45,10 +45,10 @@ static void exif_trim_spaces(char *str)
  {
  {
    if (*str != ' ')
    if (*str != ' ')
    {
    {
      end = str;
      end = str+1;
    }
    }
  }
  }
  *++end = '\0';
  *end = '\0';
}
}




@@ -187,6 +187,8 @@ void exif_get_info(ExifData * ed, char *buffer, unsigned int maxsize)
        {
        {
          /* Digital Vari-Program */
          /* Digital Vari-Program */
          exif_get_mnote_tag(ed, 171, buffer + strlen(buffer), maxsize - strlen(buffer));
          exif_get_mnote_tag(ed, 171, buffer + strlen(buffer), maxsize - strlen(buffer));
          /* Lens */
          exif_get_mnote_tag(ed, 132, buffer + strlen(buffer), maxsize - strlen(buffer));
        }
        }


      }
      }
+4 −1
Changes for src/filelist.c: 4 added lines, 1 removed line.
Original line number Original line Diff line number Diff line
@@ -54,6 +54,9 @@ feh_file *feh_file_new(char *filename)
	else
	else
		newfile->name = estrdup(filename);
		newfile->name = estrdup(filename);
	newfile->info = NULL;
	newfile->info = NULL;
#ifdef HAVE_LIBEXIF
	newfile->ed = NULL;
#endif
	return(newfile);
	return(newfile);
}
}


@@ -70,7 +73,7 @@ void feh_file_free(feh_file * file)
	if (file->info)
	if (file->info)
		feh_file_info_free(file->info);
		feh_file_info_free(file->info);
#ifdef HAVE_LIBEXIF
#ifdef HAVE_LIBEXIF
	if (file->info)
	if (file->ed)
		exif_data_unref(file->ed);
		exif_data_unref(file->ed);
#endif		
#endif		
	free(file);
	free(file);
+2 −0
Changes for src/imlib.c: 2 added lines, 0 removed lines.
Original line number Original line Diff line number Diff line
@@ -522,6 +522,8 @@ void feh_draw_exif(winwidget w)
		return;
		return;
	}
	}



	buffer[0] = '\0';
	exif_get_info(FEH_FILE(w->file->data)->ed, buffer, MAX_EXIF_DATA);
	exif_get_info(FEH_FILE(w->file->data)->ed, buffer, MAX_EXIF_DATA);


	fn = feh_load_font(w);
	fn = feh_load_font(w);