Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8689411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:38:25+00:00 2026-06-12T23:38:25+00:00

Well.. I have been looking for a image upload with a crop and resize

  • 0

Well.. I have been looking for a image upload with a crop and resize function..

Found a lot.
But I can find one where I can choose a MUST-BE width..

So that if my MUST-BE width is set to be 250px.

Then the crop should allow a minumum width, which should be the set MUST-BE width.
It should be possible to be bigger then the MUST-BE width while cropping, but after cropping, it should resize the width to be the set MUST-BE width..

Hope I make sense.

I found this: http://www.nwhite.net/2009/02/25/lassocrop-preview/
Which do most of the magic.

I just don’t know how to get PHP to do those actions after selected the right crop size?
And how to make the upload function to work with this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T23:38:27+00:00Added an answer on June 12, 2026 at 11:38 pm

    here we can get x,y ,h and w. Then you can assign these values to four different hidden input fields for eg:

            <input type="hidden" name="x1" value="" id="x1" />
            <input type="hidden" name="y1" value="" id="y1" />
            <input type="hidden" name="x2" value="" id="x2" />
            <input type="hidden" name="y2" value="" id="y2" />
            <input type="hidden" name="w" value="" id="w" />
            <input type="hidden" name="h" value="" id="h" /> 
    

    like that and using form action you can get all values at action page \

    $x1 = $_POST["x1"];
    $y1 = $_POST["y1"];
    $x2 = $_POST["x2"];
    $y2 = $_POST["y2"];
    $w  = $_POST["w"];
    $h  = $_POST["h"]; 
    

    Using some php image functions we can crop images

    imagecreatetruecolor();

    imagecopyresampled();

    imagegif() or imagejpeg() or imagepng ()

    I think these can already know these basic php functions and how to use it Thanks

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Similar questions have been asked but cannot find a solution that works well. What
I have looked on the net as well as here but can't find an
I have been to the zotonic docs , but well, they have not really
Can anyone help? I have been using the entity framework and its going well
well i have been looking for a java based PDF solutions...we dont have a
I have been looking for a really good, well documented jquery plug-in that will
I have been looking round for an open-source CMS framework that I can use
I have been looking at monads a lot over the past few months (functors
Well I have been writing in the same style for awhile now and all
The differences between StringBuilder and StringBuffer in Java are well documented and have been

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.