-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConfigDirectionFormat.php
43 lines (30 loc) · 1.47 KB
/
ConfigDirectionFormat.php
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
38
39
40
41
42
43
<?php
require_once __DIR__ . '/../vendor/autoload.php';
use Macocci7\PhpPhotoGps\PhotoGps;
$filename = 'img/with_gps.jpg';
$pg = new PhotoGps($filename);
echo "[" . $filename . "]--------------------\n";
// Format: default
echo "Current format [eng]: " . $pg->lang('eng')->directionFormat() . "\n";
echo "Current format [ja]: " . $pg->lang('ja')->directionFormat() . "\n\n";
// Image Direction: default format
echo "Image Direction [eng]: " . $pg->lang('eng')->directionS() . "\n";
echo "Image Direction [ja]: " . $pg->lang('ja')->directionS() . "\n\n";
// Configure Format: eng
$pg->lang('eng')->directionFormat('{degrees:v}{degrees:u}({ref})');
// Current Format
echo "Current format [eng]: " . $pg->lang('eng')->directionFormat() . "\n";
echo "Current format [ja]: " . $pg->lang('ja')->directionFormat() . "\n\n";
// Image Direction: Current Format
echo "Image Direction [eng]: " . $pg->lang('eng')->directionS() . "\n";
echo "Image Direction [ja]: " . $pg->lang('ja')->directionS() . "\n\n";
// Configure Format: ja
$pg->lang('ja')->directionFormat('{degrees:v}{degrees:u}');
// Reset Format: eng
$pg->lang('eng')->resetDirectionFormat();
// Current Format
echo "Current format [eng]: " . $pg->lang('eng')->directionFormat() . "\n";
echo "Current format [ja]: " . $pg->lang('ja')->directionFormat() . "\n\n";
// Image Direction: Current Format
echo "Image Direction [eng]: " . $pg->lang('eng')->directionS() . "\n";
echo "Image Direction [ja]: " . $pg->lang('ja')->directionS() . "\n\n";