- $im->cropImage(175,$srcX,$srcY,$srcW,$srcH);
-
- $ret = q("INSERT INTO `photo` ( `uid`, `resource-id`, `created`, `edited`, `filename`,
- `height`, `width`, `data`, `scale`, `profile` )
- VALUES ( %d, '%s', '%s', '%s', '%s', %d, %d, '%s', 4, 1 )",
- intval($_SESSION['uid']),
- dbesc($base_image['resource-id']),
- datetime_convert(),
- datetime_convert(),
- dbesc($base_image['filename']),
- intval($im->getHeight()),
- intval($im->getWidth()),
- dbesc($im->imageString()
- );
-
- if($r === false)
- notice ("Image size reduction (175) failed." . EOL );
-
- $im->scaleImage(80);
-
- $ret = q("INSERT INTO `photo` ( `uid`, `resource-id`, `created`, `edited`, `filename`,
- `height`, `width`, `data`, `scale`, `profile` )
- VALUES ( %d, '%s', '%s', '%s', '%s', %d, %d, '%s', 5, 1 )",
- intval($_SESSION['uid']),
- dbesc($base_image['resource-id']),
- datetime_convert(),
- datetime_convert(),
- dbesc($base_image['filename']),
- intval($im->getHeight()),
- intval($im->getWidth()),
- dbesc($im->imageString()
- );
-
- if($r === false)
- notice("Image size reduction (80) failed." . EOL);