rotation-utils.h 2.12 KB
Newer Older
Paolo Bacchilega's avatar
Paolo Bacchilega committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */

/*
 *  GThumb
 *
 *  Copyright (C) 2005 Free Software Foundation, Inc.
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
 */

#ifndef ROTATION_UTILS_H
#define ROTATION_UTILS_H

#include <config.h>
#include <gtk/gtk.h>
#include "typedefs.h"

#include "gth-exif-utils.h"

typedef struct _RotationData RotationData;
struct _RotationData {
    GthTransform  rot_type;
    GthTransform  tran_type;
};

Paolo Bacchilega's avatar
Paolo Bacchilega committed
38
RotationData*	        rotation_data_new ();
Paolo Bacchilega's avatar
Paolo Bacchilega committed
39

Paolo Bacchilega's avatar
Paolo Bacchilega committed
40 41
void			update_rotation_from_exif_data (const char      *filename,
							RotationData 	*rot_data);
42 43 44
void			apply_transformation_exif      (GtkWindow       *win,
							const char      *filename,
							RotationData 	*rot_data);
Paolo Bacchilega's avatar
Paolo Bacchilega committed
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
void			apply_transformation_jpeg      (GtkWindow       *win,
							const char      *filename,
							RotationData 	*rot_data);
void			apply_transformation_generic   (GtkWindow       *win,
							const char      *filename,
							RotationData 	*rot_data);
ExifShort		get_next_value_rotation_90     (int value);
ExifShort		get_next_value_mirror          (int value);
ExifShort		get_next_value_flip            (int value);

void			update_orientation_field       (const char      *filename, 
							RotationData    *rot_data);
gboolean		swap_fields                    (ExifContent     *content,
							ExifTag          tag1,
							ExifTag          tag2);
void			swap_xy_exif_fields            (const char      *filename);
Paolo Bacchilega's avatar
Paolo Bacchilega committed
61 62

#endif /* ROTATION_UTILS_H */