DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
  1. DZone
  2. Coding
  3. Languages
  4. Imagine: an image manipulation library in PHP 5.3

Imagine: an image manipulation library in PHP 5.3

John Esposito user avatar by
John Esposito
·
Oct. 22, 11 · Interview
Like (0)
Save
Tweet
Share
4.20K Views

Join the DZone community and get the full member experience.

Join For Free

Want to work with images in PHP? and absorb some best practices while you're at it?

Check out Imagine, an "OOP library for image manipulation built in PHP 5.3".

PHP sometimes gets a bad rap for bad code -- maybe because lots of web developers wrote their first apps in PHP, and maybe old coding habits in an easy-to-use scripting language die hard.

Imagine, inspired by Python's PIL, hopes to show you just how well-constructed a PHP library can be.

The creator (avalanche123 on github) has documented everything extensively, from usage to API to defense of a few apparent quirks in the code.

Value objects in Imagine, for example, don't define any setter -- and here's why:

"Value objects - as you’ve noticed neither BoxInterface nor PointInterface along with their implementations define any setter. That means the state of those objects is immutable, so there aren’t side-effects to happen and the fact that they’re passed by reference, will not affect their values."


So for some solid code and good (and self-consciously OOP) explanatory tips for solid code construction -- or if you just want to manipulate some darn images! -- take a look at Imagine.

PHP Library

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Top 10 Best Practices for Web Application Testing
  • Secure APIs: Best Practices and Measures
  • How To Build a Spring Boot GraalVM Image
  • Apache Kafka Is NOT Real Real-Time Data Streaming!

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: