Need a mod for options on resizing images on upload - $15.00 Need a mod for options on resizing images on upload - $15.00
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Need a mod for options on resizing images on upload - $15.00

Started by sion3000, October 03, 2005, 11:56:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sion3000

Hello

I need a mod that will allow my users to choose from 3 pre defined sizes when they upload. The sizes need to be able to be changed (only in code not the config screen)
Basicly i need the following:
A user has an image over 1mb my limit on my site is 250kb. Some users do not know how to resize their images + they dont want to use the XP web publishing wizard.
So they go to upload their image if its more than 250kb a window comes up and goes your file is larger than the maximum 250kb (or whatever the max size is) please choose from the following options.
a) Small 75kb
b) Medium 150kb
c) Large 240kb
They choose the option and it then re-sizes the image to the correct size depending on the size they want. It then deletes the original size image and saves it as normal.

If you could get it working on your system i will evaluate and then i will add the code myself into the system. (Please provide where to change and files that needed adding etc)
I will pay $15.00

If you have any other reasonable offers or any other ideas please dont hesitate to contact me.

Thanks

Sion

Joachim Müller

Resizing with a file size limit is hard to accomplish, as you can't tell in advance how big the file is going to become. Resizing with dimensions limit isn't. The unsupported devel version cpg1.4.1 already has a "resize on upload" feature built into it, you might want to give it a try. It can't overcome server limitations though, only restrictions within certain parameters.

sion3000

The upgrade to the new beta version was an option i was thinking about. ???

I know its a lot of work, i was going to work on it my self but i got to the point where i didnt know where to start.

If anyone can come up with any other ideas on a solution to this please sugest!

I will also be wiling to be up the payment based on the amount of work the solution is.

Sion  ; :D

artistsinhawaii

Found this website, might be what you are looking for.  I didn't try it out though.

http://www.resize2mail.com/

You may want to try a few sizes out to see which ones fall into your categories.  Then recommend your users to that site.

Dennis
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.

sion3000

That looks good. Given me another option to posibly try. Thanks

Modify:

Ok managed to figure a way out of doing this. Posibly someone could code this ? Also quote a price?

1. Customer uploads a photo to the site

2. A message comes back and tells them the file is too big for the system. It gives them 2 links

a) Return to the home page without upload anything.

b) It will auto fit the photo for them in the following way

1. Firstly it shrinks it by 15% and test the file size if its ok it lets the system save it otherwise it shrinks it another 15% it continues to do this until it reaches an acceptable size.

Once it reaches an accepable size it presents them the normal add to this album screen.
It then deletes the original file.

Anyone fancy coding this ?

Thanks

Sion

Stramm

I know about the problem ;) and it's the same here. I don't like 2 mb monster pics sitting around on my server. Or better.. I don't like these monsters to get served by the webserver. So there's a very easy solution. Compress all images (including the fullsized ones). That'll usually give <200k images. If pics are > 1280x1024px or 1024x800px (depending on your compression ratio) it'll usually doesn't work anymore. In that case just resize the fullsized image to one of the mentioned sizes.

1. Recompressing images you can do with applying a watermark mod... if you don't want a watermark just use a fully transparent image or a 1x1pc one etc.
2. Also there are mods for resizing fullsized images

--> if you want to have small filsizes <100k then just resize all to eg 800x600

sion3000

Ok Managed to get someone to help build me a function to do this. If anyone wants the function here it is: might be an idea to move this to another board mods.

<?php
function size_jpeg ($original$thumbnail$width$height$quality) {
  list(
$width_orig$height_orig) = getimagesize($original);
  if (
$width && ($width_orig $height_orig)) {
   
$width = ($height $height_orig) * $width_orig;
  }
       else {
   
$height = ($width $width_orig) * $height_orig;
  }
  
$image_p imagecreatetruecolor($width$height);
  
$image imagecreatefromjpeg($originial);
  
imagecopyresampled($image_p$image0000$width$height$width_orig$height_orig);
  
imagejpeg($image_p$thumbnail$quality);
  return;
}
?>


Once i get the whole thing working i will post instructions on how to do everything.

Thanks for everyones help

Sion

Stramm

in picmgmnt.inc.php -> function resize_image($src_file, $dest_file, $new_size, $method, $thumb_use)

this one is working together with gd, gd2 and imagemagick