Feature Requests item #1462964, was opened at 2006-04-02 10:00 Message generated for change (Comment added) made by lsolesen You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=650325&aid=1462964&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: example of read / display Initial Comment: I found it very hard to get started with this library. It looks really useful, but there's no generic example of reading the header info. It should be pretty simple for those who know the library to produce an example that opens an image and lists all the header information pel can see. I tried to do this and got unexpected errors and found the API very confusing. I strongly expected to be able to do something like: foreach ($mPelJpeg->getSections as $section) { $marker = $section[0]; $content = $section[1]; print "marker : " . $marker->getName() . "<br>\n"; foreach ($content->Entries as $Entry) { print $Entry->getName . "=" . $Entry->getText() . "<br>\n"; } but I think I am clearly confused about what the model is. I understand how to get at a specific tag if I already know exactly where it is, but... a generic example would be incredibly useful. thanks ---------------------------------------------------------------------- >Comment By: Lars Olesen (lsolesen) Date: 2010-02-24 10:46 Message: Closing this for being out of date. Reopen if it is still an issue. ---------------------------------------------------------------------- Comment By: Martin Geisler (mgeisler) Date: 2006-04-07 21:31 Message: Logged In: YES user_id=1264592 You are right that the documentation is lacking examples of actual use of PEL --- the API is documented on the class/method level, but the big picture is not that well documented. The code you wished for almost works as far as I can tell from a bit of mental debugging: you should not treat $marker as an object, it is a plain integer, namely one of the constants in PelJpegMarker. I have just called it a PelJpegMarker in the documentation to indicate that it isn't any random integer... Now that I think of it this is probably very counter-intuitive. Maybe one could let these constants be real objects, created only once (singletons) and accesible from the PelJpegMarker class. I'll have to think about it and see if it's possible at all with the level of OO available in PHP5. I will let this tracker item stay open until the documentation is fixed or a better solution is implemented. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=650325&aid=1462964&group_id=108380 ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ PEL-devel mailing list PEL-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pel-devel