Previous Thread
Next Thread
Print Thread
Hop To
#260863 01/11/2018 9:11 AM
Joined: Jun 2006
Posts: 987
Likes: 24
Old Hand
Old Hand
Joined: Jun 2006
Posts: 987
Likes: 24
7.6.1 installed
I know you developers prefer ImageMagick over GD2 please read below test.
ImageMagick does not seem to work as GD2" when it comes to reduce pixel size.
What can be wrong??? as it is now I will use GD2 but I want off course to use ImageMagick so what can I do to change the way ImageMagick works???
Is this something I can change or maybe the forum software or my host I use a VPS service from Interserver.
Please advice

The original photo was 7,3MB .jpg all uploads are the same photo

Gallery forum test: one using GD2 and one using ImageMagick.
Test is done to compare the full size image.
As you can see GD2 reduces the full size image pixels down to 800x500px while ImageMagick keeps the original 3780x2389 pixels size.
I have used a 90% high resolutions just to get a good image with GD2. Thumbs and Medium are default sizes.

test upload with 90% full size GD2
http://www.britbike.com/forums/ubbthreads.php/galleries/721728
http://www.britbike.com/forums/gallery/32/full/3015.jpg 169kb

test upload with 90% full size ImageMagick
http://www.britbike.com/forums/ubbthreads.php/galleries/721729
http://www.britbike.com/forums/gallery/32/full/3016.jpg the full size image that has NOT been reduced in pixel size 2,89MB


-----------------------------------------------------------------


Below are same test but for forum posts I used only 10% resolution to see how the image quality.
GD2 reduced the size down to 800x505px just like the Gallery did
and ImageMagick did not reduce the pixel size.

test upload with 10% full size GD2
http://www.britbike.com/forums/ubbt...-upload-with-10-full-size-gd2#Post721721


test upload with 10% full size ImageMagick
http://www.britbike.com/forums/ubbt...with-10-full-size-imagemagick#Post721720





Last edited by Morgan; 01/11/2018 9:18 AM.

Morgan Johansson
BritBike Forum
https://www.britbike.com/forums/ubbthreads.php
Morgan #260865 01/11/2018 12:55 PM
Joined: Apr 2004
Posts: 1,945
Likes: 145
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,945
Likes: 145
I believe you may have misunderstood how image compression works. Setting an item to use 10% compression doesn't mean that the output file will be garenteed to be reduced by 10% of it's original file size. There are a lot of additional factors involved in 2hat happens to an image and that's based on what the image contains. Each image is unique. And your JPEG image is probably already somewhat compresses before you even touch it.

https://en.m.wikipedia.org/wiki/JPEG

UBB.threads has no control over the version settings of ImageMagick or gd configured on your server. it just takes the image and passes it along to the with the compression/sizing requests, and goes from there.

There is not really much more that can be done to these blanket strings passed from a single command line to every single image that goes through it.

ImageMagick is generally better and handles transparent png/gif files and animated gif files better. GD is a bit quicker and requires slightly less memory and is bundled with current php server package installs.

Beyond that, I'm not really sure what youd like ubb.threads to do, based on your post.


Current developer of UBB.threads PHP Forum Software
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Feb 2007
Posts: 1,294
Likes: 2
Veteran
Veteran
Joined: Feb 2007
Posts: 1,294
Likes: 2
I think he was saying don't run out and have ImageShack installed if you don't have it on your server.

JAISP #260867 01/11/2018 1:39 PM
Joined: Apr 2004
Posts: 1,945
Likes: 145
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,945
Likes: 145
Originally Posted by JAISP
I think he was saying don't run out and have ImageShack installed if you don't have it on your server.

JAISP, this is nothing to do with ImageShack https://imageshack.com/

If you want to handle Animated GIF or images with transparencies, ImageMagick is preferred. As I have found GD to have troubles with those on each of the three test servers available to me.

As always, its best to do your own research and use what works best for your own personal needs. And thankfully, there are a lot of back & forth discussions of ImageMagick vs GD all over the internet at this time. http://bfy.tw/FzoQ


Current developer of UBB.threads PHP Forum Software
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Jun 2006
Posts: 987
Likes: 24
Old Hand
Old Hand
Joined: Jun 2006
Posts: 987
Likes: 24
(Oh I was writing my reply when you were posting so I didn't see above replies)



Hi Isaac, The 10% example was just an example so we can forget the percentage.

The difference between ImageMagick vs GD2 how it works on my UBBThreads vs yours or others UBBThreads is interesting

On BritBike forum the GD2 setting executes a compression/sizing and because it reduces px sizing the end product becomes sufficiently small in size. That I like.
I tested to set both max 800px and 1920px so that works at least for jpg's.
Imagemagick executes a string for compression but not pixel sizing. That I don't like.

Since ImageMagick overall handles images better I wonder is there a way to get both compression/ px sizing by using ImageMagick?
Maybe I need to ask the correct question to my host.. whatever the queston is.
It might be of interest to other UBBThread forum owners.

The GD2 string UBBThreads is producing certainly works but not the imageMagick string.

Anyway I thank you for listening to this forum enthusiast without the proper techical education.
I'll keep the GD2 setting for now and test a bit more. If I get certain enough I will change the settings for our
members so that they can upload at least 8MB images to BritBike instead of having toresize first themselves.
The members would just love it.

Btw thanks for 7.6.1 I have only received positivities from our members smile


Last edited by Morgan; 01/11/2018 2:01 PM.

Morgan Johansson
BritBike Forum
https://www.britbike.com/forums/ubbthreads.php
Joined: Apr 2004
Posts: 1,945
Likes: 145
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,945
Likes: 145
Originally Posted by Morgan
The GD2 string UBBThreads is producing certainly works but not the imageMagick string.

You're welcome to open the php script yourself and skim through it. The scrip is simple, quite small, and easy to quickly get through. Its located at:
/libs/image.inc.php

In that script, the same basic string format is used for each:
$exec = "\"{$config['CONVERT_PATH']}\" {$config['FULL_PATH']}/tmp/$sourcefile $thumb {$width}x{$height} $quality {$output}:\"{$config['FULL_PATH']}/tmp/$sourcefile.$type\" 2>&1";

Remember though, the setting which UBB.threads use are the most basic, with the pure intent of covering the broadest type of images sizes and their content. A photo of the grand canyon vs a photo of a starry night vs an animated gif vs a family gathering vs a screenshot or a transparent company logo... of which may all produce different results.

Regarding UBB.threads, if your intent of using the image attachments feature is to share visual images with others on the internet, it just works as intended. But if you need the attachments to be guaranteed untouched, or you have a batch/package of many images, your best bet is to put them all in to an archive (such as zip or rar) and attach that file.

Further reading:
https://www.sitepoint.com/imagick-vs-gd/
(nothing specific other than it being the very first link in google when searching for im vs gd)

And of course:
PHP & GD @ https://secure.php.net/manual/en/book.image.php
PHP & ImageMagick @ https://secure.php.net/manual/en/book.imagick.php


Current developer of UBB.threads PHP Forum Software
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Jun 2006
Posts: 987
Likes: 24
Old Hand
Old Hand
Joined: Jun 2006
Posts: 987
Likes: 24
Thank for the info
the photosmembers are uploading is for sharing with other members.
Very often it is various photos of bikes and parts and restorations
or a bike meet or a holiday photo so its nothing complicated as I see it.
They can of course link from other sites also but that is something different.

If they need to send high res then they can always ask to be emailed.
I'm checking what I can find in my VHM / CP right now.
I will check out your info above asap to see what i can learn.

Cheers


Morgan Johansson
BritBike Forum
https://www.britbike.com/forums/ubbthreads.php
Joined: Jun 2006
Posts: 987
Likes: 24
Old Hand
Old Hand
Joined: Jun 2006
Posts: 987
Likes: 24
Isaac.

here I am the novice, amateur whatever.. someone said there are no dumb questions so I take a chance.
I opened the /libs/image.inc.php and fount this code.
question what happen if I change the value "99999" to "800" ?
would it force the full size image to max 800px ?
If so maybe in a future it could be in the CP that one could set your own value there?
Just asking grin


Quote
function resize_image($type,$sourcefile="") {
global $config;

if (!$config['MAX_THUMB_W_H']) {
$config['MAX_THUMB_W_H'] = "200";
}
if (!$config['MAX_MEDIUM_W_H']) {
$config['MAX_MEDIUM_W_H'] = "480";
}
if (!$config['MAX_FULL_W_H']) {
$config['MAX_FULL_W_H'] = "99999";
}



Morgan Johansson
BritBike Forum
https://www.britbike.com/forums/ubbthreads.php
Joined: Apr 2004
Posts: 1,945
Likes: 145
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,945
Likes: 145
Those are default values for when there is nothing stored in the configuration file at all.

ie; !$config

After you visit/submit the configuration page in the Control Panel for the very first time, values get set, and those lines of code you quoted are never used.

Its intended as a safety net for when a forum is upgraded from an older version, and the admin neglects configuring their forum attachment settings.

edit:
its similar to using "Your Forum Name" as the default forum name used, when an admin has not set one yet.

Last edited by isaac; 01/11/2018 2:54 PM.

Current developer of UBB.threads PHP Forum Software
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Jun 2006
Posts: 987
Likes: 24
Old Hand
Old Hand
Joined: Jun 2006
Posts: 987
Likes: 24
OK Isaac, that does not work then. it was worth a shot..

A new question came up in my head.
The Thumbs and Medium options are actually being resized when I alter the settings and upload a new image, I have lowered both those settings but not increased above default. What is the difference between Full size vs Thumb/Med and why is the Full not being reduced in pixels? That is my question and I understand if you can't answer but it's in my head for now and I can't see that it should be different.

Enough thinking for today smile

Last edited by Morgan; 01/11/2018 3:16 PM.

Morgan Johansson
BritBike Forum
https://www.britbike.com/forums/ubbthreads.php
Joined: Apr 2004
Posts: 1,945
Likes: 145
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,945
Likes: 145
iirc, small, med, large are for processing gallery thumbs/full of the images. post attachments get just the large (regular) attention.


Current developer of UBB.threads PHP Forum Software
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Jun 2006
Posts: 987
Likes: 24
Old Hand
Old Hand
Joined: Jun 2006
Posts: 987
Likes: 24
So while processing a
small=thumb 200px default
medium=medium 480px defaul
large=full 1920px default... this option in the future could be a menu saying 640, 800,1920, etc etc and end maybe with original size. and it would be handled same as thumb and med.

wishful thinking anyway.. smile

I have taken to much of your time now.
Time for lunch where you are and evening beverage where I am
Thanks


Morgan Johansson
BritBike Forum
https://www.britbike.com/forums/ubbthreads.php

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
2 members (Havenofsobriety, rootman), 624 guests, and 106 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)