Edmonds Commerce Logo
  • home
    • blog
  • ecommerce
    • product catalogue
    • order processing
    • customer services
    • stock control
    • human resources
    • management information
  • development
    • oscommerce
    • php
    • mysql
    • open source
    • performance tuning
  • design
  • marketing
  • contact us
    • pricing

Edmonds Commerce Blog

Freelance PHP Ecommerce and SEO Developer in the UK

Latest Posts

CRELoaded Remove Google Ads -
ICECat Integration with osCommerce, Magento etc
Magento UK
PHP Cached Download Function

Most Popular Posts

PHP Email Attachment Function Freelance osCommerce UK Ultimate osCommerce Checkout - Fast and Friendly PHP : Dead Easy Excel Export

Archive for the 'gd' Category

Flash and PHP Charts and Graphs

Wednesday, May 14th, 2008

It is entirely possible and easy enough to create all kinds of charts and graphs using only PHP along with the GD library.

These days PHP is generally compiled with the GD library enabled so it is highly likely that you already have access to it. It is a powerful system, unfortunately often only used for creating thumbnail images.

For building management information systems with real time generated graphs there are some excellent classes available which will help you display information in a graphical and therefore easier to understand manner.

Checkout these great free graph classes:

Class: Google Graph
Class: Bar Graph generator
Class: Graph Drawing Class 2

However, sometime the graphics produced by GD simply are not flash enough for your application.

When you want something really flashy on your web site then you really can’t go wrong using flash.

There are a few flash graph packages you can purchase online for not too much cash. However if you prefer to keep it all open source then I highly recommend checking out this open source flash graph class.

Open Flash Chart project

Further Reading:

noteplog.com
bivald.com
blogs.sun.com
www.webappers.com
blogulate.com
www.linewbie.com
hotware.wordpress.com
wordpress.designpraxis.at
www.stat.columbia.edu

Posted in flash, gd, graphs, php | 3 Comments »

Who Needs Photoshop? PHP GD Images and Your Online Store

Monday, February 18th, 2008

Many web masters will be familiar with Photoshop by Adobe. This highly featured photo editing and graphics application is incredibly powerful, but also incredibly expensive. If you find that the main thing you do with photoshop is basic product image cropping, resizing, trimming, rotating and watermarking then there is a better way!

If your server uses PHP and has GD functionality enabled, you can use the power of the GD library to automatically do all of these things for you. Furthermore the GD library is faster than using photoshop and as the process actually runs on your server, you do not have to worry about uploading files. Your employees can directly manipulate product photos from your web store administration screens.

Chances are the main thing you will need to do is to take one hi res source image and create one or more resized versions of it to be displayed as thumbnails or product info page images. Your Hi Res images can then be displayed as a pop up or lightbox.

There are many PHP GD thumbnail classes etc out there and you will easily find one by searching the major search engines.

Here are the basic concepts though:

1. Grab an image into memory from an external jpeg file
Before we can do anything we have to get an image into the memory. This then gives us something to work with.

PLAIN TEXT
PHP:
  1. //grab image into memory,  $img = full url to jpeg image
  2. if(!$jpeg = imagecreatefromjpeg($img)){
  3. echo '
  4. <h2 style="color: red">Failed to Grab Image ' . $img . '</h2>
  5. ';
  6. exit;
  7. }

2. Manipulate Image however you want
There are all kinds of things you can do with the image you have loaded using the GD library.

3. Display the Image or Save to Disk
Once you have manipulated the image and have it looking the way you want, you can either serve it up or save it to the disk. Of course you can also do both if you prefer.

PLAIN TEXT
PHP:
  1. //save image
  2. $save_path = 'Your Save Path';
  3. imagejpeg($jpeg,$save_path);
  4.  
  5. //display image
  6. header ("Content-Type: image/jpeg");
  7. imagejpeg($jpeg);
  8.  
  9. //destroy image to free memory
  10. imagedestroy($jpeg);

Related Resources
http://uk3.php.net/gd
http://www.phpclasses.org/browse/package/1365.html
http://www.phpit.net/article/image-manipulation-php-gd-part1/

Posted in gd, php, programming | No Comments »

  • RSS Feed
  • Categories

    • apache
    • barcode
    • creloaded
    • curl
    • customer services
    • debugging
    • ecommerce
    • email
    • excel
    • firefox
    • flash
    • gd
    • graphs
    • hosting
    • icecat
    • internet news
    • javascript
    • link building
    • linux
    • magento
    • management
    • mod_rewrite
    • mysql
    • oscommerce
    • php
    • plesk
    • product catalogue
    • product feed
    • programming
    • regular expressions
    • scraping
    • search engine optimisation
    • spidering
    • ubuntu
    • web design
    • web development
    • Windows
    • xampp
    • zip
  • Archives

    • August 2008
    • July 2008
    • June 2008
    • May 2008
    • April 2008
    • March 2008
    • February 2008
  • Tags

    addons advanced adverts blackhat blocking css curl development directories find firefox google hosts file html javascript keywords links msn mysql myths operators oscommerce paid links paid placement performance php ppc reciprocal linking replace screen scraping security seo serp speed spider spidering tuning user friendly vista web web design web developer
  • Random Posts

    • Ecommerce Back Office Optimisations
    • EAN13 Barcode Check Digit with PHP
    • Essential Search Engine Optimisation Research Tool
    • CRELoaded Remove Google Ads -
    • Advanced Google Search Queries
    • PHP and Zip Files
    • HOSTS file, Vista and Blocking Unwanted Adverts
    • Saving a File or Webpage using PHP
    • osCommerce Password Reset Using phpMyAdmin
    • 10 SEO Myths

Edmonds Commerce related questions? Send us a message or call us on 0844 357 0201.

Freelance PHP Web Design UK Commercial Web Design