Upload images → Arrange until the specified size → Save as a single image

Asked 5 months ago, Updated 5 months ago, 18 views

What should I do if I want to implement the following?
·Image upload
until the specified size (in XY direction) ·Save as a single image

"·After uploading the image, I think I saw an ImageMagic sample online that magnifies the image itself and trims the image itself, but I don't know what to do with ""arranging it until the specified size""
" ·After displaying it side by side in CSS, capture the elements?
·Even if you don't do that, can you do something with ImageMagic?

·The joints are not seamless, just repeat the arrangement
·It doesn't have to be ImageMagic

javascript php image imagemagick

2022-09-30 13:45

1 Answers

It seems to be easy to implement with GD.
I don't know what to do with the overhanging sample below, so I try to overhanging it.
I didn't check if the image was POSTed, so please try to insert it yourself.


// Image Height to Specify

// Width of image to specify
$maxWidth=(int)$_POST ['max_width'];

// uploaded image

// Divided by /


    // GD the uploaded image

    // image height

    // image width

    // GD for copy

    // Number of vertical copies (floor if not overhanging)

    // Number of horizontal copies (floor if not overhanging)

    // copy away

    // output the results of


2022-09-30 13:45

If you have any answers or tips

© 2023 OneMinuteCode. All rights reserved.