SourceForge.net | 6 Dec 14:43
Picon
Favicon

[ pel-Patches-1911643 ] Sanyo and Pentax test images

Patches item #1911643, was opened at 2008-03-11 06:24
Message generated for change (Settings changed) made by lsolesen
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=650324&aid=1911643&group_id=108380

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Test image
Group: None
>Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: Dan Fandrich (dfandrich)
Assigned to: Martin Geisler (gimpster)
Summary: Sanyo and Pentax test images

Initial Comment:
The attached test images may be added to the PEL test images archive under the GPL. The first was taken by a
Sanyo VPC-C5. The second by a Pentax Optio 430RS.

----------------------------------------------------------------------

>Comment By: Lars Olesen (lsolesen)
Date: 2010-12-06 13:43

Message:
This will be implemented as soon as I figure out the following.
https://github.com/lsolesen/pel/issues/issue/12
(Continue reading)

SourceForge.net | 6 Dec 13:37
Picon
Favicon

[ pel-Support Requests-2993747 ] add/edit orientation tag on jpg?

Support Requests item #2993747, was opened at 2010-04-28 18:30
Message generated for change (Settings changed) made by lsolesen
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=650323&aid=2993747&group_id=108380

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
Priority: 5
Private: No
Submitted By: Matt Gilbert (mattgilbertnet)
Assigned to: Nobody/Anonymous (nobody)
Summary: add/edit orientation tag on jpg?

Initial Comment:
How do I add/edit an orientation tag to a jpg? I've tried editting the edit-description.php example to do
this, but no luck so far. Here is my code:

$exif_orientation = 6; // 90CW, tested with in exiftool

drupal_set_message('Reading file "'.$input.'".');
$data = new PelDataWindow(file_get_contents($input));

/* The static isValid methods in PelJpeg and PelTiff will tell us in
 * an efficient maner which kind of data we are dealing with. */
if (PelJpeg::isValid($data)) {
  /* The data was recognized as JPEG data, so we create a new empty
(Continue reading)

SourceForge.net | 6 Dec 13:36
Picon
Favicon

[ pel-Feature Requests-1210126 ] parsing method

Feature Requests item #1210126, was opened at 2005-05-27 19:45
Message generated for change (Comment added) made by lsolesen
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=650325&aid=1210126&group_id=108380

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Martin Geisler (mgeisler)
Summary: parsing method

Initial Comment:
Why does the current implementation require reading the
entire image file into memory? Surely it'd be a lot
less memory intensive if it could read and parse the
tag bit by bit.

----------------------------------------------------------------------

>Comment By: Lars Olesen (lsolesen)
Date: 2010-12-06 12:36

Message:
Reopen at https://github.com/lsolesen/pel/issues if it is still an issue?
(Continue reading)

Lars Olesen | 1 Dec 23:15
Picon

PEL moved to github

PEL has now moved entirely to http://github.com/lsolesen/pel. Please
go there to see the new README. If you have outstanding bug reports
please file them there. PEL will not be updated at sourceforge
anymore.

--

-- 
Lars Olesen

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
SourceForge.net | 1 Dec 23:03
Picon
Favicon

[ pel-Bugs-2979466 ] endless loop in PelIfd->load

Bugs item #2979466, was opened at 2010-03-30 15:44
Message generated for change (Comment added) made by lsolesen
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=650322&aid=2979466&group_id=108380

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Parsing
Group: PEL Version 0.9.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: endless loop in PelIfd->load

Initial Comment:
I get "Fatal error: Allowed memory size of xxx bytes exhausted" while trying to read some images (see
attached file) due to an endless loop in PelIfd which repeatedly loads itself (line: 240)

----------------------------------------------------------------------

>Comment By: Lars Olesen (lsolesen)
Date: 2010-12-01 22:03

Message:
A test has been added at:
https://github.com/lsolesen/pel/commit/42fff79104fa5f043207b132164b444d150a64d8.
(Continue reading)

SourceForge.net | 1 Dec 23:01
Picon
Favicon

[ pel-Bugs-3017880 ] getEntry(PelTag::IMAGE_UNIQUE_ID) always returns null

Bugs item #3017880, was opened at 2010-06-18 04:28
Message generated for change (Comment added) made by lsolesen
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=650322&aid=3017880&group_id=108380

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Parsing
Group: PEL Version 0.9.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Fred N (fnplus)
Assigned to: Nobody/Anonymous (nobody)
Summary: getEntry(PelTag::IMAGE_UNIQUE_ID) always returns null

Initial Comment:
I clear the Exif data of a jpeg and then add a new entry and this process works properly, except with the PelTag
of IMAGE_UNIQUE_ID. Once an image has been processed with it, it should now have a new entry for SOFTWARE,
for example, so if I run the script again on the image that was just processed, instead of $software
returning null, it will return a value, which means it only needs to be updated using
$software->setValue($software_name), see the else condition below. That works for SOFTWARE and
likely all the others. However, IMAGE_UNIQUE_ID always returns null in this process, even though it has
been set the first time around. I verify that it has been set using three different Exif readers and they all
show the content is there. So, if I pass the image that was just processed through t
 he script again, it should not equal null and be sent to the else condition for updating the value. Instead,
however, it is always null. This should not be happening. 

(Continue reading)

Martin Geisler | 22 Sep 10:04
Favicon
Gravatar

Re: get pel format from pel tag

Miquel Adell BorrĂ s <insonorizate <at> gmail.com> writes:

> Hi,
>
> I've been struggling with Pel for a while and I was trying to crawl
> the TIFF data structure. At some time I needed to get the PelFormat of
> a given PelTag.
>
> I haven't find any procedure to get that automatically so I wrote the
> following:
>
>     private function getFormat($tag){
>         switch($tag){
>             case PelTag::ARTIST:
>             case PelTag::COPYRIGHT:
>             [..]
>                 return PelFormat::ASCII;
>
> Etc.
>
> I know it's not complex at all but It took me a while to assemble the
> switch. So I am sending this to you in case you need. To save you the
> time.

It looks nice.

> Oh, and thanks for maintaining the library!

I am actually no longer maintaining PEL. I have stopped using PHP some
years ago, and I have moved on to other projects.
(Continue reading)

Pippo Fresta | 6 Sep 01:04
Picon
Favicon

problem writing UserComment

Hi,
I'm trying to write UserComment but pel don't do it..
 
this is my php code
 
//-------------------------------------------------
 
$img = 'my_images_path';
 
require_once('pel/PelJpeg.php');
$jpeg = new PelJpeg($img);
$ifd0 = $jpeg->getExif()->getTiff()->getIfd();
 
$artist = $ifd0->getEntry(PelTag::ARTIST);
$artist->setValue('Edited by PEL');

$comment = new PelEntryUserComment();
$comment->setValue('Edited by PEL');
 
file_put_contents($img, $jpeg->getBytes());
 
//-------------------------------------------------
 
with this code I write Artist Information but no UserComment... WHY?
What I'm missing ??
 
thanks.
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
PEL-devel mailing list
PEL-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pel-devel
Peter | 13 Aug 02:11
Picon

image rotates back to original position

Hello,


I am adding gps information to an image with PEL. I noticed that if I rotate an image using Windows Photo Viewer, add the gps info with PEL, and save the image to a new file that the new file is rotated back the original way. I am doing something wrong? is there a way to avoid this? thanks -peter

$jpeg = new PelJpeg($imageFileName);
$exif = $jpeg->getExif();
$tiff = $exif->getTiff();
$ifd0 = $tiff->getIfd();
$gps = new PelIfd(PelIfd::GPS);
$ifd0->addSubIfd($gps);
$gps->addEntry(new PelEntryAscii(PelTag::GPS_LATITUDE, $gpsCoordinate['latitude']));
if($gpsCoordinate['latitude'] >= 0) {
$gps->addEntry(new PelEntryAscii(PelTag::GPS_LATITUDE_REF, "N"));
} else {
$gps->addEntry(new PelEntryAscii(PelTag::GPS_LATITUDE_REF, "S"));
}
$gps->addEntry(new PelEntryAscii(PelTag::GPS_LONGITUDE, $gpsCoordinate['longitude']));
if($gpsCoordinate['longitude'] >= 0) {
$gps->addEntry(new PelEntryAscii(PelTag::GPS_LONGITUDE_REF, "E"));
} else {
$gps->addEntry(new PelEntryAscii(PelTag::GPS_LONGITUDE_REF, "W"));
}
$gps->addEntry(new PelEntryAscii(PelTag::GPS_SPEED, $gpsCoordinate['speed']));
// kilometers/hour
$gps->addEntry(new PelEntryAscii(PelTag::GPS_SPEED_REF, "K"));  
$gps->addEntry(new PelEntryAscii(PelTag::GPS_ALTITUDE, $gpsCoordinate['elevation']));  
if($gpsCoordinate['speed'] >= 0) {
// above sea level
$gps->addEntry(new PelEntryAscii(PelTag::GPS_ALTITUDE_REF, 0));
} else {
// below sea level
$gps->addEntry(new PelEntryAscii(PelTag::GPS_ALTITUDE_REF, 1));
}
$gps->addEntry(new PelEntryAscii(PelTag::GPS_PROCESSING_METHOD, "MANUAL"));
$gps->addEntry(new PelEntryAscii(PelTag::GPS_TIME_STAMP, $gpsCoordinate['time_stamp']));

file_put_contents('C:\Users\peter\Desktop\test.jpg', $jpeg->getBytes());
------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
PEL-devel mailing list
PEL-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pel-devel
SourceForge.net | 21 Jul 17:40
Picon
Favicon

[ pel-Bugs-3017880 ] getEntry(PelTag::IMAGE_UNIQUE_ID) always returns null

Bugs item #3017880, was opened at 2010-06-18 04:28
Message generated for change (Comment added) made by lsolesen
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=650322&aid=3017880&group_id=108380

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Parsing
Group: PEL Version 0.9.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Fred N (fnplus)
Assigned to: Nobody/Anonymous (nobody)
Summary: getEntry(PelTag::IMAGE_UNIQUE_ID) always returns null

Initial Comment:
I clear the Exif data of a jpeg and then add a new entry and this process works properly, except with the PelTag
of IMAGE_UNIQUE_ID. Once an image has been processed with it, it should now have a new entry for SOFTWARE,
for example, so if I run the script again on the image that was just processed, instead of $software
returning null, it will return a value, which means it only needs to be updated using
$software->setValue($software_name), see the else condition below. That works for SOFTWARE and
likely all the others. However, IMAGE_UNIQUE_ID always returns null in this process, even though it has
been set the first time around. I verify that it has been set using three different Exif readers and they all
show the content is there. So, if I pass the image that was just processed through t
 he script again, it should not equal null and be sent to the else condition for updating the value. Instead,
however, it is always null. This should not be happening. 

	@include_once $_SERVER['PHP_INCLUDE'].'/3rdparty/pel/PelJpeg.php';
	
	$success =     1; // return true by default, as this function may not resave the file, but it's still success
	$resave_file = 0;
	$jpeg =        new PelJpeg($filename);
	
	// should all exif data on photo be cleared (gd and iu will always strip it anyway, so only 
	// force strip if you know the image you're branding is an original)
	$jpeg->clearExif();

	
	if ($exif == null) 
	{
		$exif = new PelExif();
		$jpeg->setExif($exif);
		$tiff = new PelTiff();
		$exif->setTiff($tiff);	
	}
	
	$tiff = $exif->getTiff();
	$ifd0 = $tiff->getIfd();
	if ($ifd0 == null) 
	{
		$ifd0 = new PelIfd(PelIfd::IFD0);
		$tiff->setIfd($ifd0);
	}

	
	$software_name = 'Example V2';
	$software = $ifd0->getEntry(PelTag::SOFTWARE);	

	if ($software == null) 
	{
		$software = new PelEntryAscii(PelTag::SOFTWARE, $software_name);
		$ifd0->addEntry($software);
		$resave_file = 1;
		echo 'null';
	}
	else
	{
		$software->setValue($software_name);
		$resave_file = 1;
		echo 'update';
	}

	if ($resave_file == 1 
	&& !file_put_contents($filename, $jpeg->getBytes()))
	{
		// if it was okay to resave the file, but it did not save correctly
		$success = 0;
	}
	

----------------------------------------------------------------------

>Comment By: Lars Olesen (lsolesen)
Date: 2010-07-21 15:40

Message:
Could you transform your code to a simpletest. That would make it easier to
help you. As I understand your code example, it seems that it is trying to
update the SOFTWARE. Could you attach an example image and the code you are
using to update the IMAGE_UNIQUE_ID. Could you also make the code as short
as possible, so only the error shows up?

Thank you in advance.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=650322&aid=3017880&group_id=108380

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
SourceForge.net | 18 Jun 06:28
Picon
Favicon

[ pel-Bugs-3017880 ] getEntry(PelTag::IMAGE_UNIQUE_ID) always returns null

Bugs item #3017880, was opened at 2010-06-18 00:28
Message generated for change (Tracker Item Submitted) made by fnplus
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=650322&aid=3017880&group_id=108380

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Parsing
Group: PEL Version 0.9.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Fred N (fnplus)
Assigned to: Nobody/Anonymous (nobody)
Summary: getEntry(PelTag::IMAGE_UNIQUE_ID) always returns null

Initial Comment:
I clear the Exif data of a jpeg and then add a new entry and this process works properly, except with the PelTag
of IMAGE_UNIQUE_ID. Once an image has been processed with it, it should now have a new entry for SOFTWARE,
for example, so if I run the script again on the image that was just processed, instead of $software
returning null, it will return a value, which means it only needs to be updated using
$software->setValue($software_name), see the else condition below. That works for SOFTWARE and
likely all the others. However, IMAGE_UNIQUE_ID always returns null in this process, even though it has
been set the first time around. I verify that it has been set using three different Exif readers and they all
show the content is there. So, if I pass the image that was just processed through t
 he script again, it should not equal null and be sent to the else condition for updating the value. Instead,
however, it is always null. This should not be happening. 

	@include_once $_SERVER['PHP_INCLUDE'].'/3rdparty/pel/PelJpeg.php';
	
	$success =     1; // return true by default, as this function may not resave the file, but it's still success
	$resave_file = 0;
	$jpeg =        new PelJpeg($filename);
	
	// should all exif data on photo be cleared (gd and iu will always strip it anyway, so only 
	// force strip if you know the image you're branding is an original)
	$jpeg->clearExif();

	
	if ($exif == null) 
	{
		$exif = new PelExif();
		$jpeg->setExif($exif);
		$tiff = new PelTiff();
		$exif->setTiff($tiff);	
	}
	
	$tiff = $exif->getTiff();
	$ifd0 = $tiff->getIfd();
	if ($ifd0 == null) 
	{
		$ifd0 = new PelIfd(PelIfd::IFD0);
		$tiff->setIfd($ifd0);
	}

	
	$software_name = 'Example V2';
	$software = $ifd0->getEntry(PelTag::SOFTWARE);	

	if ($software == null) 
	{
		$software = new PelEntryAscii(PelTag::SOFTWARE, $software_name);
		$ifd0->addEntry($software);
		$resave_file = 1;
		echo 'null';
	}
	else
	{
		$software->setValue($software_name);
		$resave_file = 1;
		echo 'update';
	}

	if ($resave_file == 1 
	&& !file_put_contents($filename, $jpeg->getBytes()))
	{
		// if it was okay to resave the file, but it did not save correctly
		$success = 0;
	}
	

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=650322&aid=3017880&group_id=108380

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo

Gmane