Search Results

Search found 356 results on 15 pages for 'gd'.

Page 3/15 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • "Installing" GD for PHP

    - by gbuckingham89
    I'm new to server admin & Linux and have just got a VPS running CentOS 6. Apache, MySQL and PHP all came installed (along with cPanel and WHM), however I'm now also trying to install the GD library. I've run "yum install php-gd" and it installed ok. If I run it again I get "Package php-gd-5.3.2-6.el6_0.1.x86_64 already installed and latest version". However, when I do a phpinfo() or from the command line "php -m" there is no mention of GD. Is there anything else I need to do?

    Read the article

  • PHPthumbFactory file not found on upload

    - by ida
    library: http://wiki.github.com/masterexploder/PHPThumb/basic-usage i am using the PhpThumbFactory library to crop and upload an image. the error im receiving is this: Fatal error: Uncaught exception 'Exception' with message 'Image file not found: ' in /www/iaddesign/admin/classes/phpthumb/ThumbBase.inc.php:193 Stack trace: #0 /www/iaddesign/admin/classes/phpthumb/ThumbBase.inc.php(172): ThumbBase-triggerError('Image file not ...') #1 /www/iaddesign/admin/classes/phpthumb/ThumbBase.inc.php(110): ThumbBase-fileExistsAndReadable() #2 /www/iaddesign/admin/classes/phpthumb/GdThumb.inc.php(96): ThumbBase-_construct('', false) #3 /www/iaddesign/admin/classes/phpthumb/ThumbLib.inc.php(127): GdThumb-_construct('', Array, false) #4 /www/iaddesign/admin/portfolio.php(29): PhpThumbFactory::create('') #5 {main} thrown in /www/iaddesign/admin/classes/phpthumb/ThumbBase.inc.php on line 193 here is the snippet that is for the image to be uploaded. /* -------------------------------------------------------------------- */ /* SAVE ICONS */ /* -------------------------------------------------------------------- */ $icononsrc = $_FILES['iconoff']['tmp_name']; $iconoffsrc = $_FILES['iconon']['tmp_name']; $thumboff = PhpThumbFactory::create($iconoffsrc); $thumbon = PhpThumbFactory::create($icononsrc); $thumboff->adaptiveResize(200,151); $thumbon->adaptiveResize(200,151); $thumboffname = "uploads/".$_FILES['iconoff']['name']; $thumbonname = "uploads/".$_FILES['iconon']['name']; $thumboff->save($thumboffname, 'jpg'); $thumbon->save($thumbonname, 'jpg');

    Read the article

  • API numbers don't match on compiled PHP extension

    - by tixrus
    I'm trying to get GD into my PHP. I recently installed PHP5.3.0 on my system running Mac Leopard using mac ports. It did not come with the gd module. So I downloaded gd, compiled it as an extension module as per http://www.kenior.ch/macintosh/adding-gd-library-for-mac-os-x-leopard, made php.ini point to it, restarted apache etc. But no GD. So in apache error log it says PHP Warning: PHP Startup: gd: Unable to initialize module\nModule compiled with module API=20060613\nPHP compiled with module API=20090115\nThese options need to match\n in Unknown on line 0 So a bit of googling says I should not use the phpize I have before configuring and making these. I should use a new one called phpize5. I surely don't have any such thing. Unless its packed up inside something else in my php5.3. distro. Where do you get it. In Ubuntu I could just run sudo apt-get install php-dev, (apparently) and it would just appear by magic. At least that's what the webpage said. Unfortunately I am running MacOSX version Leopard. How can I build this GD module on Leopard so that it will match the API number in my PHP?

    Read the article

  • How do I install php-gd?

    - by user42577
    I've done phpinfo() to see if it was installed but I see no mention of the gd libraries anywhere. I ran this command (rpm -qa | grep php) and this is what I see: php-gd-4.3.9-3.18.1.swsoft php-mysql-4.3.9-3.18.1.swsoft php-pgsql-4.3.9-3.18.1.swsoft php-4.3.9-3.18.1.swsoft php-domxml-4.3.9-3.18.1.swsoft php-imap-4.3.9-3.18.1.swsoft php-mbstring-4.3.9-3.18.1.swsoft php-ncurses-4.3.9-3.18.1.swsoft php-pear-4.3.9-3.18.1.swsoft php-snmp-4.3.9-3.18.1.swsoft php-devel-4.3.9-3.18.1.swsoft php-ldap-4.3.9-3.18.1.swsoft php-odbc-4.3.9-3.18.1.swsoft php-xmlrpc-4.3.9-3.18.1.swsoft My server is a linux box with php5 installed. I also tried to run yum install php5-gd to no avail.What else should I do or check to get it installed?

    Read the article

  • can I have multiline text with GD and PHP?

    - by alekone
    hello! I'm trying to output multiline text with GD+PHP but can't get it working. my php knowledge is really basic. here's the code, any idea on how to output 2 or 3 lines of text? $theText = (isset($_GET['caption']))? stripslashes($_GET['caption']) :''; imagettftext($baseImage, $textSize, $textAngle, $textXposition, $textYposition, $textColor, $fontName, $theText);

    Read the article

  • How do i use a transparent image in a transparent image using GD?

    - by hogofwar
    I have tried every way I can find but the background is always black. Is there any way to keep the transparency of the first image when GD ises it in PHP? I'm using imagecopymerge to use the image. though i am not sure if this is the right way. imagecopymerge($dest, $char, 0, 0, 0, 0, 150, 300, 100); The image is like so: http://filesmelt.com/dl/draw7.php.png See that the background is black whereas the roginal picture was transparent as the modified picture should be aswell

    Read the article

  • Why when i rotate the image black borders appear? PHP GD

    - by EAGhost
    This code generates two images using GD and rotates one of them. When I rotate the image black borders begin to appear. Anyone have an idea of how to resolve this? imagefilledrectangle($im, 0, 0, 300, 400, $black); imagefilledrectangle($im, 1, 1, 298, 398, $grey); imagefilledrectangle($im, 49, 69, 251, 271, $black); imagefilledrectangle($im, 50, 70, 250, 270, $white); imagefttext($im, 13, 0, 90, 30, $black, $font_file, "Wind Direcction"); $source=imagecreatetruecolor(100, 100); imagefilledrectangle($source, 0, 0, 100, 100, $white); $values = array( 20, 30, // Point 1 (x, y) 50, 0, 80, 30, 65, 30, 65, 100, 35, 100, 35, 30 // Point 7 (x, y) ); imagefilledpolygon($source, $values, 7, $black1); $asd=imagerotate($source, $rotate, 0); imagecolortransparent($asd, $black); imageantialias($asd, true); $insert_x = imagesx($asd); $insert_y = imagesy($asd); if($rotate==0 || $rotate==90 || $rotate==180 || $rotate==270){ imagecopymerge ( $im , $asd , 100 , 130 , 0 , 0 , $insert_x , $insert_y , 100 ); } if($rotate==45 || $rotate==135 || $rotate==225 || $rotate==315){ imagecopymerge ( $im , $asd , 85 , 110 , 0 , 0 , $insert_x , $insert_y , 100 ); } imageantialias($im, true); header('Content-Type: image/png'); imagepng($im); imagedestroy($im); ?

    Read the article

  • installing php gd on ubuntu on a vps server

    - by user235196
    I was working on localhost with resizing images and everything was great. Than I uploaded to my server and things got interesting. After searching around, looks like I have to enable php-gd on my server. I tried running the line sudo apt-get install php5-gd using putty, and it didn't work. Any ideas why? Also, after the install, I assume I will need to run the function sudo reboot right? clearly I'm not an expert in this area :p

    Read the article

  • PHP GD - How can I modify my Thumbnail Creator to crop portrait images from the center?

    - by frank
    Here is my current code: $image = 'img.jpg'; $source = imagecreatefromjpeg($image); list($origWidth, $origHeight) = getimagesize($image); $imgH = 75; $imgW = $origWidth / $origHeight * $imgH; $thumb = imagecreatetruecolor($imgW, $imgH); imagecopyresampled($thumb, $source, 0, 0, 0, 0, $imgW, $imgH, $origWidth, $origHeight); This allows me to output an image with a fixed height of 75 pixels. What I would like to do is have a constant image size of 99x75 pixels. Portrait images that don't fit into this will be cropped from the center (so the center of the original remains the center of the thumbnail - if that makes sense). How can I do this?

    Read the article

  • Using PHP GD to create image form text with different fonts.

    - by Meredith
    I have been using this simple script to generate images from text: <?php header('Content-type: image/png'); $color = RgbfromHex($_GET['color']); $text = urldecode($_GET['text']); $font = 'arial.ttf'; $im = imagecreatetruecolor(400, 30); $bg_color = imagecolorallocate($im, 255, 255, 255); $font_color = imagecolorallocate($im, $color[0], $color[1], $color[2]); imagefilledrectangle($im, 0, 0, 399, 29, $bg_color); imagettftext($im, 20, 0, 10, 20, $font_color, $font, $text); imagepng($im); imagedestroy($im); function RgbfromHex($hexValue) { if(strlen(trim($hexValue))==6) { return array( hexdec(substr($hexValue,0,2)), // R hexdec(substr($hexValue,2,4)), // G hexdec(substr($hexValue,4,6)) // B ); } else return array(0, 0, 0); } ?> I call the script with file.php?text=testing script&color=000000 Now I'd like to know how could I generate text with normal and bold fonts mixed in the same image, something like file.php?text=testing <b>script</b>&color=000000

    Read the article

  • How can I overlay a watermark on an already resampled image in PHP (using GD) ?

    - by Rick
    Here's my current code: define('IMG_WIDTH', (isset ($_GET['width'])) ? (int) $_GET['width'] : 99); define('IMG_HEIGHT', (isset ($_GET['height'])) ? (int) $_GET['height'] : 75); $image = imagecreatefromjpeg($_GET['image']); $origWidth = imagesx($image); $origHeight = imagesy($image); $croppedThumb = imagecreatetruecolor(IMG_WIDTH, IMG_HEIGHT); if ($origWidth > $origHeight) { $leftOffset = ($origWidth - $origHeight) / 2; imagecopyresampled($croppedThumb, $image, 0, 0, $leftOffset, 0, IMG_WIDTH, IMG_HEIGHT, $origHeight, $origHeight); } else { $topOffset = ($origHeight - $origWidth) / 2; imagecopyresampled($croppedThumb, $image, 0, 0, 0, $topOffset, IMG_WIDTH, IMG_HEIGHT, $origWidth, $origWidth); } It basically takes an image and re-sizes it to create a thumbnail. It works quite nicely. What I would like to do now is add a watermark to the bottom right corner. I've seen the imagecopymerge function used for this... However, that doesn't seem to allow me to supply a resampled image as the source. How can I take my already modified image and add a watermark? :/ I've thought of saving the image to /tmp and then unlink()'ing it once I've added the watermark but that seems like a bit of a mess...

    Read the article

  • PHP GD problem--not enough permission to make image?

    - by aaron
    Error: Warning: imagejpeg() [function.imagejpeg]: Unable to open 'images/xxx/xxx.jpg' for writing: Permission denied in /usr/www/users/xxx/resources/func.createthumbs.php on line 48 images/xxx/xxx/xxx.jpg Warning: Cannot modify header information - headers already sent by (output started at /usr/www/users/xxx/resources/updatethumbs.php:17) in /usr/www/users/xxx/resources/func.createthumbs.php on line 3 So... How can I change the permission? This is being run on a shared server--is it possible?

    Read the article

  • Invalid operation dist-ugprade

    - by drdarwin
    i'm running Apache 2 on Debian at my VPS. Naturally i have problem with restricted GD-library of my php package and i need to fix it (i need imagerotate() function). Before installing php-gd pugin it's necessary to update php 5.2 to php 5.3 my /etc/apt/sources.list is: #deb http://ftp.ru.debian.org/debian/ lenny main contrib non-free #deb http://security.debian.org lenny/updates main contrib non-free #deb http://ftp.ru.debian.org/debian lenny main #deb-src http://volatile.debian.org/debian-volatile lenny/volatile main contrib deb http://packages.dotdeb.org stable all deb-src http://packages.dotdeb.org stable all The problem comes after apt-get dist-ugprade executing: /$ apt-get update Hit http://packages.dotdeb.org stable Release.gpg Hit http://packages.dotdeb.org stable Release Ign http://packages.dotdeb.org stable/all Packages/DiffIndex Ign http://packages.dotdeb.org stable/all Sources/DiffIndex Hit http://packages.dotdeb.org stable/all Packages Hit http://packages.dotdeb.org stable/all Sources Reading package lists... /$ apt-get dist-ugprade E: Invalid operation dist-ugprade What can cause this problem? How much should i wait while Reading package lists...? Is there any simple guideline for further php-gd installation?

    Read the article

  • How can I make an event created through Google Calendar's API send an invitation email?

    - by Cebjyre
    I'm trying to create an event through the API and it is mostly working, with the exception that while the new events are being created in the invitees calendars, no emails are being sent. Creating the event from the web interface is pushing the event through, as well as sending the email (except one account that doesn't get any notifications at all, but that's not relevant to my current problem). The event I am trying to push in is: <entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'> <category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/g/2005#event'></category> <title type='text'>test event</title> <content type='text'>content.</content> <gd:transparency value='http://schemas.google.com/g/2005#event.opaque'> </gd:transparency> <gd:eventStatus value='http://schemas.google.com/g/2005#event.confirmed'> </gd:eventStatus> <gd:where valueString='somewhere'></gd:where> <gd:who email="[redacted]" rel='http://schemas.google.com/g/2005#event.attendee' valueString='Me'><gd:attendeeStatus value='http://schemas.google.com/g/2005#event.invited'/></gd:who> <gd:who email="[redacted again]" rel='http://schemas.google.com/g/2005#event.organizer' valueString='Also Me'><gd:attendeeStatus value='http://schemas.google.com/g/2005#event.accepted'/></gd:who> <gd:when startTime='2010-05-18T15:30:00.000+10:00' endTime='2010-05-18T16:00:00.000+10:00'></gd:when> </entry> And when I request event lists I can't see any large difference between events created through the API and through the web interface.

    Read the article

  • setting library include paths in c++

    - by Drew
    Hi all, I just installed gd2 using mac ports (sudo install gd2), which installed libraries in the following places: /opt/local/include/gd.h /opt/local/lib/libgd.dylib (link) /opt/local/lib/libgd.la /opt/local/lib/libgd.a So when I create my c++ app I add '#include "gd.h"', which throws: main.cpp:4:16: error: gd.h: No such file or directory If I set gd.h as an absolute path (as above)(not a solution, but was curious), I am thrown: g++ -L/opt/local/include -L/opt/local/lib main.o Heatmap_Map.o Heatmap_Point.o -o heatmap Undefined symbols: "_gdImagePng", referenced from: _main in main.o "_gdImageLine", referenced from: _main in main.o "_gdImageColorAllocate", referenced from: _main in main.o _main in main.o "_gdImageDestroy", referenced from: _main in main.o "_gdImageCreate", referenced from: _main in main.o "_gdImageJpeg", referenced from: _main in main.o ld: symbol(s) not found So, I understand this means that ld can not find the libraries it needs (hence trying to give it hints with the "-L" values). So after giving g++ the -L hints and the absolute path in #include, I can get it to work, but I don't think I have to do this, how can I make g++/ld search int eh right places for the libraries? Drew J. Sonne.

    Read the article

  • Enable GD support in PHP

    - by Don
    Hi, I'm trying to install pixelpost on an Apache server on windows. The installer is failing because: Pixelpost will not run if your PHP installation is not compiled with the GD graphics library. I've added the following line to php.ini extension=php_gd2.dll But I still get the same error message. When I run phpinfo() I don't see any reference to GD, so I guess it really isn't installed. I searched for php_gd2.dll and it's in the ext subfolder of my PHP root dir. I know nothing about PHP, so be gentle with me. Thanks, Don

    Read the article

  • Depending on another open source library: copy/paste code or include

    - by user5794
    I'm working on a large class and started implementing new features that need graphics. I started writing the graphics functions myself, but I know that open source libraries exist that can provide me with this functionality without me having to write it myself. The problem is that I prefer the class to be self-sufficient and not dependent on any other library. If I don't write it myself, I would have to ask the user to make sure a graphics library is already installed (less user-friendly). If I write it myself, I do a lot more work than I have to. I could also copy/paste some of the relevant code into my own class, but not sure about the disadvantages of doing this (it's an open source library that matches my license, so I'm not concerned with legality, just programming-wise if there are disadvantages). So what should I do: copy paste code from the external library write the code myself so it's truly self-sufficient ask the user to download and install another library

    Read the article

  • GD! Converting a png image to jpeg and making the alpha by default white and not black.

    - by Shawn
    I tried something like this but it just makes the background of the image white, not necessarily the alpha of the image. I wanted to just upload everything as jpg's so if i could somehow "flatten" a png image with some transparently to default it to just be white so i can use it as a jpg instead. Appreciate any help. Thanks. $old = imagecreatefrompng($upload); $background = imagecolorallocate($old,255,255,255); imagefill($old, 0, 0, $background); imagealphablending($old, false); imagesavealpha($old, true);

    Read the article

  • wordpress plugin "gd star rating", rate from list

    - by Ragalante
    Hi, I have been using GD Star Rating plugin for a while now. I need my blog to allow users to rank posts, from a list of posts. I have One page which lists all posts. And I need to be able to rank each post from the list. I created a template and I am using [starrating template_id=45]. I need this, but with the posibility to rank from there. Is it possible?? Thanks!

    Read the article

  • How do I enable JPEG Support for PHP?

    - by ngache
    My Configure Command doesn't say anything about jpg, nor gif/png, but I can see gif/png support in the output of phpinfo(). I built PHP with --with-gd, but only GIF Support and PNG Support are in the output of phpinfo(), how do I enable JPEG Support?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >