note 102911 added to function.imagick-setiteratorindex

From: Date: Mon, 14 Mar 2011 18:06:11 +0000
Subject: note 102911 added to function.imagick-setiteratorindex
Groups: php.notes 
Request: Send a blank email to php-notes+get-177862@lists.php.net to get a copy of this message
This function returns true on success but setting the iterator to an invalid index throws an exception instead of returning false: Fatal error: Uncaught exception 'ImagickException' with message 'Unable to set iterator index' This can happen when counting images inside a gif file, because the iterator count starts at zero and not one. If you count the number of images in a gif file be sure to use iterator 0 for the first image, like this: $image = new Imagick('simple.gif'); $image->setIteratorIndex(0); ---- Server IP: 69.147.83.197 Probable Submitter: 87.212.166.129 ---- Manual Page -- http://www.php.net/manual/en/function.imagick-setiteratorindex.php Edit -- https://master.php.net/note/edit/102911 Del: integrated -- https://master.php.net/note/delete/102911/integrated Del: useless -- https://master.php.net/note/delete/102911/useless Del: bad code -- https://master.php.net/note/delete/102911/bad+code Del: spam -- https://master.php.net/note/delete/102911/spam Del: non-english -- https://master.php.net/note/delete/102911/non-english Del: in docs -- https://master.php.net/note/delete/102911/in+docs Del: other reasons-- https://master.php.net/note/delete/102911 Reject -- https://master.php.net/note/reject/102911 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#177862) next »