Re: [Libiptcdata-devel] Problem with Nikon pictures
Brought to you by:
dmoore
|
From: Michael D. <mic...@ya...> - 2007-02-22 04:58:15
|
=0A----- Forwarded Message ----=0AFrom: Michael Dillon <michael_d_dillon@ya= hoo.com>=0ATo: David Moore <dc...@MI...>=0ASent: Sunday, January 28, 2007 9= :16:27 PM=0ASubject: Re: [Libiptcdata-devel] Problem with Nikon pictures=0A= =0AHi David,=0A=0AI'm still getting familiar with the code, and I haven't h= ad to dive this deep into JPEGs in quite a while, so please bear with me! = =0A=0AI compared things in CVS, and the critical code appear to be identica= l. So, I'm just going to use the packaged download that's on SourceForge.= =0A=0AWhen using the D200 sample image, I make a call to iptc_jpeg_save_wit= h_ps3(). In that routine, the call to iptc_jpeg_seek_to_ps3() is returning= -1.=0A=0AWhen I dig deeper into iptc_jpeg_seek_to_ps3(), the first call to= iptc_get_short() returns a fairly large negative number (-26980). This ev= entually makes 'i' a negative number. The while() loop tries a couple more = times, and returns -1 when buf[i] !=3D JPEG_MARKER.=0A=0ATracing down to=0A= the bottom into iptc_get_sshort(), the IptcByteOrder is passed in as IPTC_= BYTE_ORDER_MOTOROLA, and the buffer that is passed in contains:=0A=0A0x96,0= x9c,E,x,i,f (and so on)=0A=0ASo, =0A=0A((buf[0] << 8) | buf[1])=0A=0Ais ret= urned to iptc_get_short() and then applied with a bitwise '&' against 0xfff= f to get the negative which seems to throw things off...=0A=0AAny ideas?=0A= =0AMike=0A=0A----- Original Message ----=0AFrom: David Moore <dc...@MI...>= =0ATo: Michael Dillon <mic...@ya...>=0ACc: libiptcdata-devel@= lists.sourceforge.net=0ASent: Sunday, January 28, 2007 3:45:06 PM=0ASubject= : Re: [Libiptcdata-devel] Problem with Nikon pictures=0A=0AI just tried mod= ifying your Nikon_D200.jpg on my Linux machine, and it=0Aworked fine. I'm = using the latest CVS version of libiptcdata, so could=0Ayou give that a try= also?=0A=0AIf that=0A still doesn't work, this is probably a Windows-only = bug. If=0Ayou're willing, I'd really appreciate it if you could track it d= own in=0Athe code since I don't have access to a Windows machine.=0A=0AThan= ks,=0A=0ADavid=0A=0AOn Sun, 2007-01-28 at 14:29 -0800, Michael Dillon wrote= :=0A> Hello,=0A> =0A> I'm encountering a problem with writing IPTC to pictu= res from Nikon=0A> cameras. =0A> =0A> The details:=0A> =0A> I'm using the = windows port of version 0.2.1.=0A> If I attempt operations on any Nikon ima= ges (from D200, D80, or 970=0A> models) I'm unable to write any data.=0A> I= f I use the iptctool on the images to read them, it crashes.=0A> In the deb= ugger, iptc_jpeg_read_ps3() returns a massive value, almost=0A> the size of= the entire image.=0A> When I call iptc_jpeg_save_with_ps3(), it always ret= urns -1.=0A> If I use Irfanview to save some IPTC data, then the library wo= rks fine=0A> on=0A the picture.=0A> My code seems to work fine for other im= ages, but not Nikon...=0A> =0A> Some sample images can be found here:=0A> = =0A> http://www.fileshack.us/v/4494380/Nikon_D200.jpg.html=0A> http://www.f= ileshack.us/v/1295234/Nikon_D70.JPG.html=0A> http://www.fileshack.us/v/1763= 376/Nikon_D80.JPG.html=0A> =0A> Does anyone have a suggested fix or workaro= und for this? I haven't=0A> started to dig into the library code yet...= =0A> =0A> Mike=0A> =0A> =0A> ----------------------------------------------= ---------------------------=0A> Take Surveys. Earn Cash. Influence the Futu= re of IT=0A> Join SourceForge.net's Techsay panel and you'll get the chance= to=0A share your=0A> opinions on IT & business topics through brief survey= s - and earn cash=0A> http://www.techsay.com/default.php?page=3Djoin.php&p= =3Dsourceforge&CID=3DDEVDEV=0A> ___________________________________________= ____ Libiptcdata-devel mailing list Lib...@li...= https://lists.sourceforge.net/lists/listinfo/libiptcdata-devel=0A=0A=0A=0A= =0A=0A=0A=0A=0A=0A |