Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image updated #1050

Merged
merged 10 commits into from
Aug 10, 2013
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updated
  • Loading branch information
dreamsxin committed Aug 10, 2013
commit 812c1baf190aa0b871c26bddb3fddc55f6df7066
16 changes: 9 additions & 7 deletions ext/image/adapter/imagick.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, _crop) {
PHP_METHOD(Phalcon_Image_Adapter_Imagick, _rotate) {

zval *degrees;
zval *im, *background, *color, *ret = NULL, *w, *h, *tmp, *index, *next = NULL;
zval *im, *background, *color, *ret = NULL, *w = NULL, *h = NULL, *tmp, *index, *next = NULL;
zend_class_entry *ce0;

PHALCON_MM_GROW();
Expand Down Expand Up @@ -339,18 +339,20 @@ PHP_METHOD(Phalcon_Image_Adapter_Imagick, _rotate) {
return;
}

if (!w) {
PHALCON_INIT_NVAR(w);
phalcon_call_method(w, im, "getImageWidth");

PHALCON_INIT_NVAR(h);
phalcon_call_method(h, im, "getImageHeight");
}

phalcon_call_method_p4_noret(im, "setImagePage", w, h, tmp, tmp);

PHALCON_INIT_NVAR(next);
phalcon_call_method(next, im, "nextImage");
} while (zend_is_true(next));

PHALCON_INIT_VAR(w);
phalcon_call_method(w, im, "getImageWidth");

PHALCON_INIT_VAR(h);
phalcon_call_method(h, im, "getImageHeight");

phalcon_update_property_this(this_ptr, SL("_width"), w TSRMLS_CC);
phalcon_update_property_this(this_ptr, SL("_height"), h TSRMLS_CC);

Expand Down