Code Monkey home page Code Monkey logo

pel's Introduction

This repository is archived, the fork at FileEye/pel has taken over. Composer requests can be made for fileeye/pel:

composer require fileeye/pel

PEL: PHP Exif Library

Tests Code Coverage Scrutinizer Code Quality Latest Stable Version Total Downloads License

README file for PEL: PHP Exif Library. A library with support for reading and writing Exif headers in JPEG and TIFF images using PHP.

Copyright (C) 2004, 2005, 2006 Martin Geisler. Licensed under the GNU GPL, see COPYING for details.

Description

The PHP Exif Library (PEL) makes it easy to develop programs that will read and write the Exif metadata headers found in JPEG and TIFF images. See the file INSTALL for an introduction to how PEL can be used by your application.

PEL is a library written entirely in PHP 5, which means that it does not have any dependencies outside the core of PHP, it does not even use the Exif module available for PHP.

Please note that the API for PEL is not yet frozen, and it will remain changeable until version 1.0 is reached. Read the NEWS file for important information about API changes.

Also, please go to the PEL development mailing list (look below) and share your ideas about how the API should look like.

Installation

composer require lsolesen/pel

Documentation Overview

  • README.markdown: gives you a short introduction to PEL (this file).
  • INSTALL.md: explain how to install and get going with PEL.
  • CHANGELOG.md: contains important information about changes in PEL.
  • examples/: small self-contained examples of how to use PEL.
  • AUTHORS: list of people who have helped.
  • run run-phpdoc.sh to generate API-documention or see it online at https://pel.github.io/pel/doc/

Features of PEL

  • Reads and writes Exif metadata from both JPEG and TIFF images.
  • Supports reading and writing all Exif tags.
  • Supports internationalization.
  • Extensible object-oriented design.
  • PhpUnit tested
  • Documented with PhpDocumentor (http://phpdoc.org/).

Helping out

Help will be very much appreciated. You can report issues, run the test suite, add patches. The best way to help out is applying patches and helping out with the tests. See instructions in the test/ directory.

All changes to code should be issued through a pull request, and other maintainers should review the code and merge it.

Languages

To work with the translations, you need the gettext package installed.

Getting Support

The first place you should consult for support is the documentation supplied with PEL, found at https://pel.github.io/pel/doc/. There you will find a complete API documentation with descriptions of all classes and files in PEL.

The scripts found in the examples/ directory are also a good source of information, especially the edit-description.php file which has tons of comments.

PEL is hosted on Github and uses the tools found there for support. This means that all questions, bug reports, etc. should be directed there (and not directly to the developers).

Please try the latest version before reporting bugs -- it might have been fixed already. The latest code can be found in the git repository at

http://github.com/pel/pel

It is very helpful if you try out the latest code from the git repository before submitting a bug report. The code found there is generally very stable.

Contributing Test Images

To make PEL as stable as possible, it is tested with images from a number of different camera models.

New test images are very much appreciated -- please download the existing test images and read the README file found there for instructions.

Credits

Please see the AUTHORS file for a list of people who have contributed to PEL. See the full list of code contributors.

pel's People

Contributors

andreas-bergstrom avatar artemshelest avatar brandonkelly avatar darkain avatar deyv avatar emyu10 avatar hussainweb avatar ivangrozni avatar lsolesen avatar mgeisler avatar mondrake avatar plantaquatix avatar rodrigoaguilera avatar svenbluege avatar tm1000 avatar v1r0x avatar weberhofer avatar xpaw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pel's Issues

Possibility to create custom tag?

Hello, is there possibility to create custom tag and load it to file? So far I found only tutorial how to edit existing record. What about new one? Thank you.

Problem with - pel debug equal true

From the pel examples folder, I was testing the edit-description.php script which produced a error "Cannot access private property Pel::$debug in C:\pel\examples\edit-description.php on line 62". Is the code meant to be public instead of private on line 59 (private static $debug = false;) in the Pel.php class? However, I have changed line 59 to public and the code worked. Could it be that line 62 of the file "edit-description.php" code should have been Pel::setDebug(true); instead of changing the code on line 59 of Pel.php private static $debug = false; to public? I am working with PHP 5.6.13 version. I think this may be a bug, so what should be the best option here?

[Insight] Commented code should not be committed - in src/PelEntrySRational.php, line 133

in src/PelEntrySRational.php, line 133

Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

        }

        switch ($this->tag) {
            case PelTag::SHUTTER_SPEED_VALUE:
                // CC (e->components, 1, v);
                // if (!v_srat.denominator) return (NULL);
                return Pel::fmt('%.0f/%.0f sec. (APEX: %d)', $v[0], $v[1], pow(sqrt(2), $v[0] / $v[1]));

            case PelTag::BRIGHTNESS_VALUE:
                // CC (e->components, 1, v);
                //

Posted from SensioLabsInsight

Getting silent fatal errors when an unknown tag has a weird value.

I have an image that is throwing the PelInvalidDataException on line 808 of PelIfd.php. However, it looks like the weird value for the unknown tag is preventing the exception from being constructed, and the script dies silently.

I don't know the correct way to solve this, but a working solution for me is:

In PelEntry, line 248:

- $str .= Pel::fmt("    Value     : %s\n", print_r($this->getValue(), true));
+ $str .= Pel::fmt("    Value     : %s\n", utf8_encode(print_r($this->getValue(), true)));

This seems to allow the exception to be created and the file to continue processing.

Trying to get Lens Info

Hi, I'm trying to use pen to get the lens info from my photos. I am having a heck of a time finding my way around the library. I can get the basic ifd0 data to load, but I cannot figure out how to get to the rest of the tags. I double checked the uploaded image to make sure it actually had the data stored, and it does. Any help would be appreciated. I've been banging away at this little project for a couple of days now with little luck.

EXIF value misses the last character

I use the following code snippet to read the camera model:

<?php

setlocale(LC_ALL, '');

require_once '../autoload.php';
use lsolesen\pel\PelDataWindow;
use lsolesen\pel\PelJpeg;
use lsolesen\pel\PelTiff;
use lsolesen\pel\Pel;
use lsolesen\pel\PelTag;

$prog = array_shift($argv);
$file = $argv[0];;
Pel::setDebug(true);


$input_jpeg = new PelJpeg($file);

$app1 = $input_jpeg->getExif();

$tiff = $app1->getTiff();
$ifd0 = $tiff->getIfd();
echo $ifd0->getEntry(PelTag::MODEL);

The code returns this for the attached image file:

/> php dump-image.php D:\temp\event\test7\20161125_124812_p4101ldrnightstrong.jpg
  Tag: 0x0110 (Model)
    Format    : 2 (Ascii)
    Components: 21
    Value     : Canon EOS 5D Mark II
    Text      : Canon EOS 5D Mark II

As you can see, it states a Canon 5D Mark II but actually it is a 5D MK III. The last character got lost somehow. The same file works fine in other exif tools:

image

Do you have any clue what is wrong here? I'm a bit clueless here.

20161125_124812_p4101ldrnightstrong

PelTag convert is fail

I am a Chinese user
I found the jpg output getBytes() garbled after load

As if because added one more
https://github.com/lsolesen/pel/blob/master/src/PelIfd.php IN 382 line start

original data: AA 6C 42 00 30 00 30 00
output data: AA 00 6C 00 42 00 30 00

AA 00 6C 00 '00' is extra

Seems to be because of the Chinese byte problem

Besides, I don't know why endian set BIG_ENDIAN output jpg still LITTLE_ENDIAN
original jpg is BIG_ENDIAN

$jpeg = new PelJpeg(new PelDataWindow($this->file, PelConvert::BIG_ENDIAN));

Non-latin characters in PelEntryWindowsString

Why does PelEntryWindowsString support only Latin-1 character set?
Windows surely supports other ASCII character sets in file properties dialog (particularly, russian: Windows-1251).

Adhere to coding standard

The coding standards should adhere to the same standards as the standard sniffer from PHP_Codesniffer. Check using:

phpcs <file>

Image Title and Location ?

Hey there, I'm really sorry for posting this, but I'm simply going nuts already, I'm trying to re-arrange a photo library, and I have no idea, absolutelly, no idea how to get this working to change the title.
The GPS data was really simple, the example helped, a lot, and I really mean it.
But how can I change the image title ? and SUBJECT_Location, I've already tried working this out for the past 2 days and I simply can't get it working. Any hints would help & mean a lot.

Any suggestions or tips on how I can achieve this ? I'm simply out of ideas.

I've read & noticed this isn't maintained by the original creator, and used anymore, but maybe someone can take a few minutes and help a desperate guy here :).
I couldn't actually get more than it's already in the documents, i've tried A LOT of other things, such as IPTC information and such, but nothing lets me achieve my end goal, which is displaying the right info when using the "Get Image Info" on MAC & Windows.

  • Description and GeoLocation data are working perfect.
function addFullInformation(
    $input, $output,
    $title, $location, $description, $keywords,
    $longitude, $latitude, $altitude, $date_time) {
  $jpeg = new PelJpeg($input);

  $exif = new PelExif();
  $jpeg->setExif($exif);

  $tiff = new PelTiff();
  $exif->setTiff($tiff);

  $ifd0 = new PelIfd(PelIfd::IFD0);
  $tiff->setIfd($ifd0);

  $inter_ifd = new PelIfd(PelIfd::INTEROPERABILITY);
  $ifd0->addSubIfd($inter_ifd);

  $ifd0->addEntry(new PelEntryAscii(PelTag::DATE_TIME, $date_time));
  $ifd0->addEntry(new PelEntryAscii(PelTag::IMAGE_DESCRIPTION, $description));

  _addGPSInformation($ifd0, $latitude, $longitude, $altitude);

  file_put_contents($output, $jpeg->getBytes());
}

[Insight] Unused method, property, variable or parameter - in test/*Test.php

It makes little sense to test the constructor without any values when they are required. I think we should remove these tests. @weberhofer Do you agree?

in test/AsciiTest.php, line 40

This entry local variable is declared but never used. You should remove it.

     * @expectedMessage                Undefined variable: tag
     * @expectedExceptionMessageRegExp /Missing argument 1 for lsolesen.pel.PelEntryAscii::__construct()/
     */
    function testConstructorWithNoValues()
    {
        $entry = new PelEntryAscii();
    }

    function testReturnValues()
    {
        $entry = new PelEntryAscii(42);

Posted from SensioLabsInsight

Why two directories with images

We need to browse through the svn history of the sourceforge repository to find out, why there are both images in the image-test folder and in the image directory.

Support for Regions

Please consider adding support for regions, as described in section 5.9 of the metadataworking group's published guidance:
http://www.metadataworkinggroup.com/pdf/mwg_guidance.pdf

Google Picasa is using it for face detection, so being able to retrieve that information would be really useful for PHP apps.

Sample exiftool output

# exiftool IMG_6420.JPG  | egrep -i region
Region Applied To Dimensions W  : 3456
Region Applied To Dimensions H  : 5184
Region Applied To Dimensions Unit: pixel
Region Name                     : Travis Kelley
Region Type                     : Face
Region Area X                   : 0.531829
Region Area Y                   : 0.371238
Region Area W                   : 0.0983796
Region Area H                   : 0.0788966
Region Area Unit                : normalized

I've looked in https://github.com/lsolesen/pel/blob/master/src/PelIfd.php and could not find it, so I'm assuming it's missing.

Create a new PEAR repository

pear channel-discover pearhub.org
Adding Channel "pearhub.org" succeeded
Discovery of channel "pearhub.org" succeeded
pear install pearhub/PEL
No releases available for package "pearhub.org/PEL"
install failed

Trouble with first use of PEL

I'm trying to use PEL to make a web page that will read/edit Exif data. I'm not sure I'm including the PEL files correctly. Here's what I've done:

  1. Uploaded all the PEL .php files into a directory called: /home/mydomain/private/PEL
  2. edited the global php.ini file: /home/mydomain/php.ini by adding this:

;Include PEL - PHP Exif Library
include_path = "/home/mydomain/private/PEL"

Then I created a file called gallery.php that includes this:

$jpeg = new PelJpeg($file);
echo $jpeg;

The gallery file worked fine until I added the above 2 lines of code. But after I added reference to PelJpeg, it gives me this error:

Fatal error: Class 'PelJpeg' not found in /home/mydomain/www/www/photogallery/gallery.php on line 28

Line 28 is where the PelJpeg reference is. What am I doing wrong?
-Thanks.

split() deprecated in PHP 5.3

In PHP 5.3 the following error occurs.

 Unexpected PHP error [Function split() is deprecated] severity [8192] in [/home/lsolesen/workspace/pel/src/PelEntryAscii.php line 320]

Pel silently corrupts images if mbstring.func_overload != 0

I think, Pel must warn users (as other scripts do, e.g. phpMyAdmin) if PHP interpreter setting mbstring.func_overload is not zero.
I have some tests with mbstring.func_overload = 2 and Pel silently corrupted JPEG files on data writing.

Make tests pass

I need people to run the test suite, as to see which tests passes and which does not.

I have some tests which does not pass, but I think should pass.

Improve overall code quality

It seems that Scrutinizer is not impressed by our overall code quality.

E.g. https://scrutinizer-ci.com/g/lsolesen/pel/inspections/4f433adf-3b1f-414d-86ed-26310cc94f72

@weberhofer Do you have time to devote a little time into improving that figure? I've recently spend a lot of time converting the tests to PHPUnit, and as I am not using this library actively, I do not have more time to devote to improving the code quality. Though I thing that would be good for the future development to improve the score.

Code contributions should be through pull requests

When doing code contributions also for the maintainers, they should be issued through pull requests. That will make it possible to have the test suite and scrutinizer to run before merging, squashing commits so they are prettier and making sure that the maintainers can comment the code changes before merging master.

@weberhofer @robinlehrmann

PEL is up for adoption

I am not using PEL in any of my own projects, and haven't been for a while. Therefore, the project needs a new maintainer, which actually maintains the code. Are you up for it?

tests fail + massive memory usage during test

I am now able to run the test suite. There are a couple of tests failing, until it reaches some point where a lot of memory is used, before the scripts finally dies off, when there is no more memory left for it to allocate:

$ php run-tests.php 
Found SimpleTest version 1.1beta
 in /home/tkn/public/simpletest/!
All PEL tests
�$��\��������@������� ������5 character 282 with [...����

�$��\��������@������� ������5 [...����

�������"��D �6��j�`��...] at [/home/tkn/public/lsolesen-pel/test/image-tests/canon-powershot-s60.php line 211]
        in testRead
        in PEL canon-powershot-s60.jpg Tests
        in image-tests/canon-powershot-s60.php
        in Image Tests
2) Equal expectation fails at character 1365 with [...!11111111111111111111111111111111111111111111111111��������!����������������������

�����������}������!1A��Qa"q�2��#B���R��$3br�  
�����%&'()*456789:CDEFGHIJSTUVWXYZcdefghi...] and [...!11111111111111111111111111111111111111111111111111��������!����������������������

�����������}������!1A��Qa"q�2��#B���R��$3br�
�����%&'()*456789:CDEFGHIJSTUVWXYZcdefghijs...] at [/home/tkn/public/lsolesen-pel/test/image-tests/pentax-istDS.php line 523]
        in testRead
        in PEL pentax-istDS.jpg Tests
        in image-tests/pentax-istDS.php
        in Image Tests
E_WARNING: Missing argument 1 for PelEntryAscii::__construct(), called in /home/tkn/public/lsolesen-pel/test/ascii.php on line 40 and defined in /home/tkn/public/lsolesen-pel/src/PelEntryAscii.php on line 92
Exception 1!
Unexpected PHP error [Missing argument 1 for PelEntryAscii::__construct(), called in /home/tkn/public/lsolesen-pel/test/ascii.php on line 40 and defined] severity [2] in [/home/tkn/public/lsolesen-pel/src/PelEntryAscii.php line 92]
        in testReturnValues
        in PEL Exif ASCII Tests
        in ascii.php
E_NOTICE: Undefined variable: tag in /home/tkn/public/lsolesen-pel/src/PelEntryAscii.php on line 93
Exception 2!
Unexpected PHP error [Undefined variable: tag] severity [8] in [/home/tkn/public/lsolesen-pel/src/PelEntryAscii.php line 93]
        in testReturnValues
        in PEL Exif ASCII Tests
        in ascii.php
3) Pattern [/Missing argument 1 for PelEntryAscii::__construct()/] not detected in [Boolean: false] -> Expected error not caught at [/home/tkn/public/simpletest-trunk/errors.php line 135]
        in testReturnValues
        in PEL Exif ASCII Tests
        in ascii.php
4) Equal expectation fails at character 0 with [Undefined variable: tag] and [] -> Expected error not caught at [/home/tkn/public/simpletest-trunk/errors.php line 135]
        in testReturnValues
        in PEL Exif ASCII Tests
        in ascii.php
E_WARNING: Missing argument 1 for PelEntryTime::__construct(), called in /home/tkn/public/lsolesen-pel/test/ascii.php on line 59 and defined in /home/tkn/public/lsolesen-pel/src/PelEntryAscii.php on line 232
Exception 3!
Unexpected PHP error [Missing argument 1 for PelEntryTime::__construct(), called in /home/tkn/public/lsolesen-pel/test/ascii.php on line 59 and defined] severity [2] in [/home/tkn/public/lsolesen-pel/src/PelEntryAscii.php line 232]
        in testTime
        in PEL Exif ASCII Tests
        in ascii.php
E_WARNING: Missing argument 2 for PelEntryTime::__construct(), called in /home/tkn/public/lsolesen-pel/test/ascii.php on line 59 and defined in /home/tkn/public/lsolesen-pel/src/PelEntryAscii.php on line 232
Exception 4!
Unexpected PHP error [Missing argument 2 for PelEntryTime::__construct(), called in /home/tkn/public/lsolesen-pel/test/ascii.php on line 59 and defined] severity [2] in [/home/tkn/public/lsolesen-pel/src/PelEntryAscii.php line 232]
        in testTime
        in PEL Exif ASCII Tests
        in ascii.php
E_NOTICE: Undefined variable: tag in /home/tkn/public/lsolesen-pel/src/PelEntryAscii.php on line 233
Exception 5!
Unexpected PHP error [Undefined variable: tag] severity [8] in [/home/tkn/public/lsolesen-pel/src/PelEntryAscii.php line 233]
        in testTime
        in PEL Exif ASCII Tests
        in ascii.php
E_NOTICE: Undefined variable: timestamp in /home/tkn/public/lsolesen-pel/src/PelEntryAscii.php on line 234
Exception 6!
Unexpected PHP error [Undefined variable: timestamp] severity [8] in [/home/tkn/public/lsolesen-pel/src/PelEntryAscii.php line 234]
        in testTime
        in PEL Exif ASCII Tests
        in ascii.php
E_WARNING: Missing argument 2 for PelEntryTime::__construct(), called in /home/tkn/public/lsolesen-pel/test/ascii.php on line 65 and defined in /home/tkn/public/lsolesen-pel/src/PelEntryAscii.php on line 232
5) Pattern [/Missing argument 1 for PelEntryTime::__construct()/] not detected in [String: Missing argument 2 for PelEntryTime::__construct(), called in /home/tkn/public/lsolesen-pel/test/ascii.php on line 65 and defined] -> PHP error [Missing argument 2 for PelEntryTime::__construct(), called in /home/tkn/public/lsolesen-pel/test/ascii.php on line 65 and defined] severity [E_WARNING] in [/home/tkn/public/lsolesen-pel/src/PelEntryAscii.php] line [232] at [/home/tkn/public/simpletest-trunk/errors.php line 155]
        in testTime
        in PEL Exif ASCII Tests
        in ascii.php
E_NOTICE: Undefined variable: timestamp in /home/tkn/public/lsolesen-pel/src/PelEntryAscii.php on line 234
6) Pattern [/Missing argument 2 for PelEntryTime::__construct()/] not detected in [String: Undefined variable: timestamp] -> PHP error [Undefined variable: timestamp] severity [E_NOTICE] in [/home/tkn/public/lsolesen-pel/src/PelEntryAscii.php] line [234] at [/home/tkn/public/simpletest-trunk/errors.php line 155]
        in testTime
        in PEL Exif ASCII Tests
        in ascii.php
7) Equal expectation fails at character 0 with [Undefined variable: tag] and [] -> Expected error not caught at [/home/tkn/public/simpletest-trunk/errors.php line 135]
        in testTime
        in PEL Exif ASCII Tests
        in ascii.php
8) Equal expectation fails at character 0 with [Undefined variable: timestamp] and [] -> Expected error not caught at [/home/tkn/public/simpletest-trunk/errors.php line 135]
        in testTime
        in PEL Exif ASCII Tests
        in ascii.php
9) Pattern [/Missing argument 2 for PelEntryTime::__construct()/] not detected in [Boolean: false] -> Expected error not caught at [/home/tkn/public/simpletest-trunk/errors.php line 135]
        in testTime
        in PEL Exif ASCII Tests
        in ascii.php
10) Equal expectation fails at character 0 with [Undefined variable: timestamp] and [] -> Expected error not caught at [/home/tkn/public/simpletest-trunk/errors.php line 135]
        in testTime
        in PEL Exif ASCII Tests
        in ascii.php
11) Test should not throw an exception at [/home/tkn/public/lsolesen-pel/test/bug1730993.php line 49]
        in testThisDoesNotWorkAsExpected
        in Bug1730993 Test
        in bug1730993.php
PHP Fatal error:  Out of memory (allocated -1186463744) (tried to allocate 5 bytes) in /home/tkn/public/lsolesen-pel/src/PelIfd.php on line 804

adding random location data for multiple images

I have used 'pel' in one of my projects and needed to modify the code in gps.php file. I had to collect images in input folder , then it is needed to add random location data for each image . I will open a pull request for this addition . I guess there will be developers who needs this functionality.
@Isolesen : Thanks for your great job .

Update make-release.sh to use github instead of sourceforge

The make-release.sh should use github repository instead of sourceforge.

  • Some fairly clever stuff going on with changelog etc. We need to find out what to happen with that?
  • The sourcecode has been moved into src. Find out where the .mo-files should go in the make-release.sh?

'...Should be compatible with...'

PEL is working great for me, however I just added some error handling to the site I'm building and can't figure this out. Every time any of my pages that use PEL are loaded, I get these errors:

PelEntryUndefined.php' on line 285: Declaration of PelEntryUserComment::setValue() should be compatible with that of PelEntryUndefined::setValue()

PelEntryUndefined.php' on line 414: Declaration of PelEntryVersion::setValue() should be compatible with that of PelEntryUndefined::setValue()

PelEntryAscii.php' on line 559: Declaration of PelEntryCopyright::setValue() should be compatible with that of PelEntryAscii::setValue()

PelEntryNumber.php' on line 307: Declaration of PelEntryNumber::setValue() should be compatible with that of PelEntry::setValue()

I can read and write EXIF just fine, but even after days of endlessly searching the web, I can't figure out what is going on. On my gallery page, all it does it read EXIF. Why are the errors regarding setValue()? I found a post about these exact messages from 2008, but I didn't see a solution. I'm very new to this, so forgive me if I've missed something elementary. Here is the PEL code from the gallery page if it helps:

//////////////////////EXIF PROCESSING//////////////////////////////////
$data = new PelDataWindow($pic);
if (PelJpeg::isValid($data)) {
    $pJpg = new PelJpeg($pic);
    $exif = $pJpg->getExif();
    if ($exif != null){//if there is exif data
        $tiff = $exif->getTiff();
        $ifd0 = $tiff->getIfd();
        //sub ifds
        $ifd0_0 = $ifd0->getSubIfd(PelIfd::EXIF); // IFD Exif
        if($entry = $ifd0_0->getEntry(PelTag::DATE_TIME_ORIGINAL)){
            $time1 = $entry->getValue();//if exif includes original date and time
            $eDate = date( "M d, Y", $time1)." (date taken)";
        }else{
            $eDate = $newDate;  
        }
    }
}
//////////////////////DONE EXIF PROCESSING/////////////////////////////

Sorry for the bother, but thanks very much for any help. Even a shove in the right direction would be a good start for me!

Cannot access private property Pel::$quality - create testcase

This happens when running the resize.php example as well as in my own code. Is 5.2.17 not a new enough version of PHP or what am I doing wrong? Same result pulling from git as installing from pearhub.

PHP Fatal error:  Cannot access private property Pel::$quality in /var/www/html/pel/src/PelDataWindow.php on line 134
PHP Stack trace:
PHP   1. {main}() /var/www/html/pel/examples/resize.php:0
PHP   2. PelJpeg->__construct() /var/www/html/pel/examples/resize.php:116
PHP   3. PelDataWindow->__construct() /var/www/html/pel/src/PelJpeg.php:173

Out of Memory Exception while processing a couple of JPEG files

I try to read exif data from a couple of images during one request.

By just calling $input_jpeg = new PelJpeg($input); a couple of times I get an out of memory Exception while executing get_file_content(). I wonder is there is any trick to wipe the memory once I'm done with the $input_jpeg object.

Uses PHP version: 5.4.7

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.