Class: Exiv2::Tag

Inherits:
Object
  • Object
show all
Defined in:
ext/exif.cpp

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.countObject

Count of all available exif tags



274
275
276
277
278
279
280
281
282
283
# File 'ext/exif.cpp', line 274

static VALUE exiv2_tags_count(VALUE self) {
	__BEGIN
	return INT2NUM(
	iterate_tag_collection(Exiv2::ExifTags::ifdTagList(), false) +
	iterate_tag_collection(Exiv2::ExifTags::exifTagList(), false) +
	iterate_tag_collection(Exiv2::ExifTags::iopTagList(), false) +
	iterate_tag_collection(Exiv2::ExifTags::gpsTagList(), false)
	);
	__END
}

.eachObject

Iterates through all available exif tags, that can be set in the image



260
261
262
263
264
265
266
267
268
# File 'ext/exif.cpp', line 260

static VALUE exiv2_tags_each(VALUE self) {
	__BEGIN
	iterate_tag_collection(Exiv2::ExifTags::ifdTagList());
	iterate_tag_collection(Exiv2::ExifTags::exifTagList());
	iterate_tag_collection(Exiv2::ExifTags::iopTagList());
	iterate_tag_collection(Exiv2::ExifTags::gpsTagList());
	return self;
	__END
}

Instance Method Details

#descObject

description of exif tag



313
314
315
316
317
318
319
320
# File 'ext/exif.cpp', line 313

static VALUE exiv2_tag_desc(VALUE self) {
	__BEGIN
	Exiv2::TagInfo* tag;
	Data_Get_Struct(self, Exiv2::TagInfo, tag);
	
	return tag->desc_ ? rb_str_new2(tag->desc_) : Qnil;
	__END
}

#ifdObject

IFD of exif tag



337
338
339
340
341
342
343
344
# File 'ext/exif.cpp', line 337

static VALUE exiv2_tag_ifd(VALUE self) {
	__BEGIN
	Exiv2::TagInfo* tag;
	Data_Get_Struct(self, Exiv2::TagInfo, tag);
	
	return rb_str_new2(Exiv2::ExifTags::ifdName(tag->ifdId_));
	__END
}

#nameObject

Name of exif tag



289
290
291
292
293
294
295
296
# File 'ext/exif.cpp', line 289

static VALUE exiv2_tag_name(VALUE self) {
	__BEGIN
	Exiv2::TagInfo* tag;
	Data_Get_Struct(self, Exiv2::TagInfo, tag);
	
	return tag->name_ ? rb_str_new2(tag->name_) : Qnil;
	__END
}

#sectionObject

section of exif tag



325
326
327
328
329
330
331
332
# File 'ext/exif.cpp', line 325

static VALUE exiv2_tag_section(VALUE self) {
	__BEGIN
	Exiv2::TagInfo* tag;
	Data_Get_Struct(self, Exiv2::TagInfo, tag);
	
	return rb_str_new2(Exiv2::ExifTags::sectionName(tag->sectionId_));
	__END
}

#titleObject

title of exif tag



301
302
303
304
305
306
307
308
# File 'ext/exif.cpp', line 301

static VALUE exiv2_tag_title(VALUE self) {
	__BEGIN
	Exiv2::TagInfo* tag;
	Data_Get_Struct(self, Exiv2::TagInfo, tag);
	
	return tag->title_ ? rb_str_new2(tag->title_) : Qnil;
	__END
}