Home
Forums
Members
Search
Help
New topics
Todays topics
Website
Welcome Guest, Not a member yet?
Register
Sign In
Login
Username:
Password:
Remember me
Lost Password?
CodeIgniter Forums
Archived Discussions
Archived General Discussion
Determine uploaded image's width and height before using Image Manipulation Class?
Share on Google
Share on Facebook
Share on Twitter
View a Printable Version
Subscribe to this thread
Add Poll to this thread
Send thread to a friend
Linear Mode
Threaded Mode
Determine uploaded image's width and height before using Image Manipulation Class?
El Forum
Unregistered
#1
06-29-2011, 11:10 AM
[eluser]warpspasm[/eluser]
Hi Everyone,
Is there a way in Codeigniter to determine the width and height of an uploaded image before using the Image Manipulation class to resize and crop it?
Thanks!
El Forum
Unregistered
#2
07-01-2011, 02:00 AM
[eluser]toopay[/eluser]
Save the uploaded file into some temporary file first, then you can use GD lib function to determine the width and height (you can delete the temporary file, right after finish with your image manipulation procedure).
El Forum
Unregistered
#3
07-01-2011, 04:17 AM
[eluser]gRoberts[/eluser]
You could use getimagesize with your $_FILES['File']['tmp_name'] to work out the width/size.
I know you are probably using CI's upload library but you can still access the _FILES array.
--------------------
Private Messages
User Control Panel
Who's Online
Search
Forum Home
General
-- News & Discussion
-- Events
-- Lounge
-- Regional User Groups
Using CodeIgniter
-- Installation & Setup
-- Model-View-Controller
-- Libraries & Helpers
-- Best Practices
-- Choosing CodeIgniter
-- General Help
CodeIgniter 4
-- CodeIgniter 4 Roadmap
-- CodeIgniter 4 Development
-- CodeIgniter 4 Feature Requests
-- CodeIgniter 4 Support
-- CodeIgniter 4 Discussion
-- CodeIgniter 4 Addins
Development
-- CodeIgniter 3.x
-- CodeIgniter 2.x
-- Issues
-- NetBeans Plugin
External Resources
-- Spotlight
-- Learn More
-- Jobs
-- Addins
Archived Discussions
-- Archived Libraries & Helpers
-- Archived Development & Programming
Theme © iAndrew 2016 -
Forum software by © MyBB