Skip to content

Commit

Permalink
Merge pull request #29 from Planetbiru/fearure/2.4
Browse files Browse the repository at this point in the history
Fearure/2.4
  • Loading branch information
kamshory authored Oct 29, 2024
2 parents 153440f + a5bc51f commit 5a5c0bd
Show file tree
Hide file tree
Showing 4 changed files with 508 additions and 2 deletions.
19 changes: 18 additions & 1 deletion manual/css/css.css
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,21 @@ pre code {
background-color: #F4F4F4;
padding: 0;
line-height: 1.3;
}
}

pre .keyword {
color: blue; /* Warna untuk keyword */
font-weight: bold;
}
pre .function {
color: green; /* Warna untuk fungsi */
}
pre .variable {
color: brown; /* Warna untuk variabel */
}
pre .string {
color: red; /* Warna untuk string */
}
pre .comment {
color: grey; /* Warna untuk komentar */
}
1 change: 0 additions & 1 deletion src/Util/ClassUtil/ExtendedReflectionClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
* THE SOFTWARE.
*
* @package MagicObject\Util\ClassUtil
* @link https://github.com/Planetbiru/MagicObject
*/
class ExtendedReflectionClass extends ReflectionClass {

Expand Down
43 changes: 43 additions & 0 deletions src/Util/Image/ImageExif.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php

namespace MagicObject\Util\Image;

class ImageExif
{
public function getLatLongFromImage($imagePath) {
// Periksa apakah file ada dan dapat dibaca
if (!file_exists($imagePath)) {
return null;
}

// Ambil data EXIF dari gambar
$exif = exif_read_data($imagePath);

// Periksa apakah data GPS tersedia
if (isset($exif['GPSLatitude']) && isset($exif['GPSLongitude'])) {
// Ambil nilai latitude dan longitude
$lat = $exif['GPSLatitude'];
$latRef = $exif['GPSLatitudeRef'];
$long = $exif['GPSLongitude'];
$longRef = $exif['GPSLongitudeRef'];

// Konversi ke format desimal
$latDecimal = $lat[0] + ($lat[1] / 60) + ($lat[2] / 3600);
$longDecimal = $long[0] + ($long[1] / 60) + ($long[2] / 3600);

// Sesuaikan tanda berdasarkan referensi
if ($latRef === 'S') {
$latDecimal = -$latDecimal;
}
if ($longRef === 'W') {
$longDecimal = -$longDecimal;
}

return [$latDecimal, $longDecimal];
}

return null;
}
}


Loading

0 comments on commit 5a5c0bd

Please sign in to comment.