forum.coppermine-gallery.net
Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: fribse on July 20, 2007, 08:45:37 pm
-
Hi all
I've just gotten my new Olympus mju 770 SW which I brought with me to Egypt, and took a lot of very nice underwater pictures.
So I hurried and uploaded them to my gallery, much to my dismay I wasn't able to view any of my new pictures, though it worked with pictures from the old camera, so it had to be only the olympus maker that made problems.
I found a 'solution' of sorts in the forums, telling me to turn of exif, I wouldn't call it 'solved' but a very poor workaround.
One of the very few cool things that CPG has over a lot of other galleries are the EXIF extraction, so it would be a shame to miss out on it.
So, please please get it fixed!
BR
Fribse
-
How about an image to test with?
-
Yes, of course, sorry.
It's a bit too big for posting here, so I've put it directly on my homepage: http://www.fribert.dk/2007-07-16_17-51-33.JPG
If there is anything else I can do, don't hesitate to ask, though from tomorrow I'll be offline for a week.
-
No news about this issue?
-
I took a look but it's beyond me to come up with a fix.
-
Ok, is there a bug system I should report it to? Or have you already done that?
/Fribse
-
http://forum.coppermine-gallery.net/index.php?topic=34936.msg178752#msg178752
http://forum.coppermine-gallery.net/index.php?topic=32767.0 (German thread)
The EXIF library used with Coppermine is outdated and doesn't get developed any longer. Therefor, there may be issues with particular EXIF fields and the content in it. There may be issues with different EXIF flavors by different camera vendors. Hard to recommend anything, sorry.
As explained above: EXIF is in no way a standard. All camera vendors have their own flavor of Exif. Coppermine only supports some Exif-tags, but not all of them. There's little we could do. In fact, the Exif feature comes as-is.
None of the devs is an exif-expert, so we're simply not capable to come up with a revised exif library. I'm sorry, but you'll have to live with this I'm afraid, or use another application.
-
Ahh, darned :'(
-
I had the similar problem with OLYMPUS E-3 camera pictures.
I did some debuging and found out, that there are some problems with reading EXIF tag called MakersNote
It is parsed in include file include\makers\olympus.php
If you change part of code in function
function parseOlympus($block,&$result,$seek, $globalOffset) {
if($bytesofdata<=4) {
$data = $value;
} else {
To
if($bytesofdata<=4) {
$data = $value;
} else if($bytesofdata<100000) {
It will stop failing.
Anyway, it looks like OLYMPUS have changed MakersNote format in new cameras, and current code is not able to identify none of tags in MakersNote
I am not sure how my changes will affect pictures from old cameras, but shouldn't much.
Regards
-
Ignore my previous post :)
I have found real solution finally :)
This is code sample i used make proper fix:
http://libexif.sourceforge.net/internals/exif-mnote-data-olympus_8c-source.html
It looks like there are two versions of Olympus MakerNote V1 and V2
After
$place=8; //current place
$offset=8;
add
if( substr($block,0,7)=="OLYMPUS")
{
$place+=4;
}
It will give you right number of items in the MakerNote
-
Thanks for sharing your fix. Moving thread to bugs board to make sure that this gets looked into.
-
There was some additional issues with OLYMPUS images, with correct byte order
function parseOlympus($block, &$result,$seek, $globalOffset) {
/*
* Olympus headers start with "OLYMP" and need to have at least
* a size of 22 bytes (6 for 'OLYMP', 2 other bytes, 2 for the
* number of entries, and 12 for one entry.
*
* Nikon headers start with "Nikon" (6 bytes including '\0'),
* version number (1 or 2).
*
* Version 1 continues with 0, 1, 0, number_of_tags,
* or just with number_of_tags (models D1H, D1X...).
*
* Version 2 continues with an unknown byte (0 or 10),
* two unknown bytes (0), "MM" or "II", another byte 0 and
* lastly 0x2A.
*/
if($result['Endien']=="Intel") $intel=1;
else $intel=0;
$model = $result['IFD0']['Model'];
$place=8; //current place
$offset=8;
if( substr($block,0,7)=="OLYMPUS")
{
if( substr($block,8,2)=="II")
$intel=1;
elseif( substr($block,8,2)=="MM")
$intel=0;
$place+=4;
}
//Get number of tags (2 bytes)
$place+=2;
if($intel==1) $num = intel2Moto($num);
-
This fix worked perfectly. I own a new Olympus Stylus 850 SW camera and I was getting a 500 error on any images from this camera (obviously containing the new EXIF format).
Please include this because it will effect many more people. Every time I do a Coppermine update for security patches (seems to be often these days), I need to manually make this change or be aware of this file.
Also, if anyone uploads images from their newer Olympus camera, they'll get 500 error pages when trying to view the image. I'm surprised this easy patch has not already been applied to the main branch.
Thanks!
-
I have applied your suggested changes and cleaned up the code a bit. The changes went into the SVN, please check out SVN: coppermine/trunk/cpg1.4.x/include/makers/olympus.php Revision 4391 (http://coppermine.svn.sourceforge.net/viewvc/*checkout*/coppermine/trunk/cpg1.4.x/include/makers/olympus.php?revision=4391) and confirm that it works as expected (I don't have an Olympus camera, so I can't test for myself). Please report if this works.
-
It appears to work. I uploaded your modded file to my coppermine server and everything seemed ok. For future reference, here an Olympus photo is attached for testing.
Thanks
-Ryan
-
I had the same problem, used the new version of olympus.php and my problem solved. Now it seems to work also for exif data on olympus pictures!
thanks a lot
elena
-
OK, thanks for your reports. The changes should be in cpg1.4.19 once it gets released.
-
Oh, and it works on my u770SW as well.