Thanks for your precious time to answer me immediately!
Actually before I had selected an image from my desktop using following command, which works fine for me:
$watermark = imagecreatefromjpeg('/home/gcuf/Desktop/wm3.jpeg');
Now I am doing the same task, but now at this time, first of all, I have uploaded this picture in a newely inserted table. Now I am retrieving the same image from ownCloud table rather than from the desktop.
Now m using new code as you send me in last reply . Actually the purpose of the following script of code is to select the image from "oc_watermark" against id=1
$connection = \OC::$server->getDatabaseConnection();
$query = $connection->getQueryBuilder();
->from('oc_watermark') // no prefix needed
$result = $query->execute();
$watermark = imagecreatefromjpeg($result);
$target_image = imagecreatefromjpeg($files['tmp_name'][$i]);
But Now while selecting image from "oc_watermark" I m getting the following error? How can I get rid from the following error?