Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online Now
0 registered members (), 44 guests, and 249 spiders.
Key: Admin, Global Mod, Mod
Member Spotlight
Posts: 781
Joined: June 2006
Show All Member Profiles 
Top Posters(30 Days)
Gizmo 17
isaac 15
Ruben 14
Morgan 6
Abbott 2
Latest Photos
Testing to drag photos
Comfortable Cats
Test
BSA photos
Chinese Buddhist temple.
Previous Thread
Next Thread
Print Thread
How to adjust image pixel dimensions for 6.7.1.1 #261060
01/26/18 12:19 AM
01/26/18 12:19 AM
Joined: Dec 2008
Posts: 33
D
Digitalgas Offline OP
newbie
Digitalgas  Offline OP
newbie
D
Joined: Dec 2008
Posts: 33
I'm having trouble understanding the Attachment settings for "Image Resizing"
Do these settings only apply in Galleries? Not on attached images in forum posts?

User uploaded images into posts are coming through ImageMagick at the same pixel dimensions as they were submitted.
Example: "4,000px × 3,000px (scaled to 1,202px × 902px)"

If I could reduce pixel dimensions, I could set a higher % in Image Quality and still have an efficient file memory size.

What am I missing?

Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
Re: How to adjust image pixel dimensions for 6.7.1.1 [Re: Digitalgas] #261061
01/26/18 02:22 AM
01/26/18 02:22 AM
Joined: Jun 2006
Posts: 16,935
Portland, OR; USA
Gizmo Offline
UBB.threads Developer
Gizmo  Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 16,935
Portland, OR; USA
It would appear that there is a bug with ImageMagick, where it should resize before compression (like GD), but for whatever reason is not. Isaac mentioned that he'll have time this weekend to look further into the issue while I'm working on content rebuilder coding.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Forums: A Gardeners Forum Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Re: How to adjust image pixel dimensions for 6.7.1.1 [Re: Digitalgas] #261063
01/26/18 12:40 PM
01/26/18 12:40 PM
Joined: Dec 2008
Posts: 33
D
Digitalgas Offline OP
newbie
Digitalgas  Offline OP
newbie
D
Joined: Dec 2008
Posts: 33
I switched to the GD2 option in "Attachments" and now the pixel size is being reduced to the chosen settings. I'm able to get 800 pixel images at 80% compression and still get nice optimized file sizes.

Always thought ImageMagick did a little nicer optimization, so I hope the bug can be resolved.

Thanks!

Re: How to adjust image pixel dimensions for 6.7.1.1 [Re: Digitalgas] #261064
01/26/18 04:33 PM
01/26/18 04:33 PM
Joined: Jun 2006
Posts: 16,935
Portland, OR; USA
Gizmo Offline
UBB.threads Developer
Gizmo  Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 16,935
Portland, OR; USA
Images processed through ImageMagick are always more crisp, its why we generally recommend it over GD; hopefully we can make the string sane again after testing.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Forums: A Gardeners Forum Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Re: How to adjust image pixel dimensions for 6.7.1.1 [Re: Digitalgas] #261065
01/26/18 08:21 PM
01/26/18 08:21 PM
Joined: Apr 2004
Posts: 1,172
California
isaac Offline
UBB.threads Developer
isaac  Offline
UBB.threads Developer
Joined: Apr 2004
Posts: 1,172
California
I found the issue and created a quick patch that you can update the file on your own server with right now. Though, It is best to just wait until the next version of UBB.threads is out, since it will have a more detailed code block inserted. This code is only needed if you are using ImageMagick. GD2 does not require this attribute at all.

I've tested this with and without GD2. GD2 presents no visual errors, and still processes the images as intended -- Though, with the attribute added, GD2 may create an warning entry in the error log such as, "unrecognized command "-resize" but image was processed anyways." But I havent checked this. And thats only an assumption.


in forums/libs/image.inc.php

EDIT 2018-02-21:
IF YOU PREVIOUSLY MADE THE FOLLOWING CHANGE TO YOUR IMAGE.INC.PHP FILE, REVERT THE CHANGE OR GRAB A FRESH COPY OF THE FILE FROM THE ORIGINAL ZIP ARCHIVE. THEN SKIP THIS STRIKED-OUT SECTION, AND PROCEED TO THE "MAKE THIS CHANGE" SECTION


FIND (towards the end)
Code
	$exec = "\"{$config['CONVERT_PATH']}\" {$config['FULL_PATH']}/tmp/$sourcefile $thumb {$width}x{$height} $quality {$output}:\"{$config['FULL_PATH']}/tmp/$sourcefile.$type\" 2>&1";

REPLACE WITH
Code
	$exec = "\"{$config['CONVERT_PATH']}\" {$config['FULL_PATH']}/tmp/$sourcefile $thumb -resize {$width}x{$height} $quality {$output}:\"{$config['FULL_PATH']}/tmp/$sourcefile.$type\" 2>&1";


MAKE THIS CHANGE:

FIND (towards the end)
Code
	if ($type == "thumb" || $type == "medium") {
		$thumb = " -thumbnail ";
	} else {
		$thumb = "";
	}

REPLACE WITH
Code
	if ($type == "thumb" || $type == "medium") {
		$thumb = " -thumbnail ";
	} else {
		$thumb = " -resize ";
	}


The ImageMagick resizing issue seems to have been missing from the code long before I came on board with UBBCentral. So I guess its now finally squashed. Digitalgas, thanks for posting about it, to finally give it some needed attention!

Last edited by isaac; 02/22/18 12:48 AM. Reason: fixed my fix.

isaac @ id242.com // forum @ CelicaHobby.com
a current developer of UBB.threads php forum software // 7.6.2 Changelog
Re: How to adjust image pixel dimensions for 6.7.1.1 [Re: Digitalgas] #261066
01/26/18 08:24 PM
01/26/18 08:24 PM
Joined: Apr 2004
Posts: 1,172
California
isaac Offline
UBB.threads Developer
isaac  Offline
UBB.threads Developer
Joined: Apr 2004
Posts: 1,172
California
Graphics Library ImageMagick:
Image Max Width/Height: 1920px
Image Quality: 60%

CyanCode jpg image
5256 x 3509 - 7,201 KB [ORIGINAL]
1920 x 1281 - 525 KB [PROCESSED]

ForestHighway jpg image
500 x 750 - 76 KB [ORIGINAL]
500 x 750 - 36 KB [PROCESSED]

Attached Files CyanCode_5256x3509.jpgForestHighway_500x750.jpg

isaac @ id242.com // forum @ CelicaHobby.com
a current developer of UBB.threads php forum software // 7.6.2 Changelog
Re: How to adjust image pixel dimensions for 6.7.1.1 [Re: Digitalgas] #261067
01/26/18 08:26 PM
01/26/18 08:26 PM
Joined: Apr 2004
Posts: 1,172
California
isaac Offline
UBB.threads Developer
isaac  Offline
UBB.threads Developer
Joined: Apr 2004
Posts: 1,172
California
Graphics Library GD2:
Image Max Width/Height: 1920px
Image Quality: 60%

CyanCode jpg image
5256 x 3509 - 7,201 KB [ORIGINAL]
1920 x 1281 - 350 KB [PROCESSED]

ForestHighway jpg image
500 x 750 - 76 KB [ORIGINAL]
500 x 750 - 38 KB [PROCESSED]

Attached Files CyanCode_5256x3509.jpgForestHighway_500x750.jpg

isaac @ id242.com // forum @ CelicaHobby.com
a current developer of UBB.threads php forum software // 7.6.2 Changelog
Re: How to adjust image pixel dimensions for 6.7.1.1 [Re: Digitalgas] #261068
01/27/18 01:02 AM
01/27/18 01:02 AM
Joined: Dec 2008
Posts: 33
D
Digitalgas Offline OP
newbie
Digitalgas  Offline OP
newbie
D
Joined: Dec 2008
Posts: 33
Thanks for the quick diagnosis and solution!

Re: How to adjust image pixel dimensions for 6.7.1.1 [Re: Digitalgas] #261128
02/11/18 08:00 AM
02/11/18 08:00 AM
Joined: Jun 2006
Posts: 591
Sweden
Morgan Offline
addict
Morgan  Offline
addict
Joined: Jun 2006
Posts: 591
Sweden
I'm using 7.6.1.1 and host say they installed ImageMagick 7.0.7-22 Q16 x86_64 2018-02-10

Isaac, I must say this is wonderful news HOWEVER I have one issue

after testing several times this is my feedback.

It resizes and compresses as it should BUT when using the Gallery with the new (Isaacs) codestring it does not upload thumbnails or medium size images anymore
only the full size. see attachmens here

Link to the gallery posts are here
http://www.britbike.com/forums/ubbthreads.php/forums/32/1/britbike-gallery

link to the post with new code that did not work
http://www.britbike.com/forums/ubbthreads.php/galleries/725173

Do you have any ideas what it could be?
I cut out and pasted only the exact code that you wrote above

PS here is a link to the forum attachment that worked fine
http://www.britbike.com/forums/ubbt...-with-60-imagemagick-new-code#Post725175

attachments below:
Left thumbnail shows when using unedited code
middle shows when edited code is used
right image shows three images please read the header of each but the left broken as it shows no thumbnail

Attached Files Screen Shot 2018-02-11 at 12.43.23.jpgScreen Shot 2018-02-11 at 12.46.49.jpgScreen Shot 2018-02-11 at 12.47.43.jpg
Last edited by Morgan; 02/11/18 09:39 AM.

Morgan Johansson
BritBike Forum
http://www.britbike.com/forums/ubbthreads.php?
Re: How to adjust image pixel dimensions for 6.7.1.1 [Re: Digitalgas] #261130
02/11/18 09:46 AM
02/11/18 09:46 AM
Joined: Jun 2006
Posts: 591
Sweden
Morgan Offline
addict
Morgan  Offline
addict
Joined: Jun 2006
Posts: 591
Sweden
Isaac, it look like this forum has same issue as i describe above
see here I uploaded a post yesterday and so did Gizmo
https://www.ubbcentral.com/forums/ubbthreads.php/forums/48/1/photo-gallery

Last edited by Morgan; 02/11/18 09:47 AM.

Morgan Johansson
BritBike Forum
http://www.britbike.com/forums/ubbthreads.php?
Re: How to adjust image pixel dimensions for 6.7.1.1 [Re: Digitalgas] #261131
02/11/18 09:49 AM
02/11/18 09:49 AM
Joined: Apr 2004
Posts: 1,172
California
isaac Offline
UBB.threads Developer
isaac  Offline
UBB.threads Developer
Joined: Apr 2004
Posts: 1,172
California
Thanks Morgan. I received your previous 4 posts relating to this issue. I don't plan on doing anything about it at 5:30am on Sunday morning. I'll look in to on Monday even, when I get home from work. Thank you for reporting this.


isaac @ id242.com // forum @ CelicaHobby.com
a current developer of UBB.threads php forum software // 7.6.2 Changelog
Re: How to adjust image pixel dimensions for 6.7.1.1 [Re: Morgan] #261169
02/22/18 12:57 AM
02/22/18 12:57 AM
Joined: Apr 2004
Posts: 1,172
California
isaac Offline
UBB.threads Developer
isaac  Offline
UBB.threads Developer
Joined: Apr 2004
Posts: 1,172
California
Originally Posted by Morgan
Isaac, it look like this forum has same issue as i describe above
see here I uploaded a post yesterday and so did Gizmo
https://www.ubbcentral.com/forums/ubbthreads.php/forums/48/1/photo-gallery


Hey again Morgan. Sorry for the delay since my previous reply. Its been a busy week here. One that actually started late last weekend -- gah!

I finally had some time to review the code again. This time making further corrections to get everything working as expected.

I've updated my previous post to reflect those changes. It can be found at:
https://www.ubbcentral.com/forums/u...-pixel-dimensions-for-6-7-1-1#Post261065

Cheers laugh


isaac @ id242.com // forum @ CelicaHobby.com
a current developer of UBB.threads php forum software // 7.6.2 Changelog
Re: How to adjust image pixel dimensions for 6.7.1.1 [Re: Digitalgas] #261175
02/22/18 05:04 AM
02/22/18 05:04 AM
Joined: Jun 2006
Posts: 591
Sweden
Morgan Offline
addict
Morgan  Offline
addict
Joined: Jun 2006
Posts: 591
Sweden
Isaac, I did the change and it works thank you very much.

I noticed one other thing now as I tried to drag the photos to my image manager and it did not work. Only when I select the normal way not drag.
Tested to drag photos on UBBCentral it worked fine but not on my forum.
see attached image what showed after I tried to drag the photo.

I wonder what could cause this? Have I missed a setting?

Attached Files Screen Shot 2018-02-22 at 09.51.37.jpg

Morgan Johansson
BritBike Forum
http://www.britbike.com/forums/ubbthreads.php?
Re: How to adjust image pixel dimensions for 6.7.1.1 [Re: Morgan] #261178
02/22/18 11:02 AM
02/22/18 11:02 AM
Joined: Apr 2004
Posts: 1,172
California
isaac Offline
UBB.threads Developer
isaac  Offline
UBB.threads Developer
Joined: Apr 2004
Posts: 1,172
California
Originally Posted by Morgan
I noticed one other thing now as I tried to drag the photos to my image manager and it did not work. Only when I select the normal way not drag.
Tested to drag photos on UBBCentral it worked fine but not on my forum.
see attached image what showed after I tried to drag the photo.

I wonder what could cause this? Have I missed a setting?


please use search smile and stay on topic

https://www.ubbcentral.com/forums/u...ag-drop-attachments-not-working-with-mac

or you could be missing files in your ubb_js directory. or you are using internet explorer 10, as the link above suggests.


isaac @ id242.com // forum @ CelicaHobby.com
a current developer of UBB.threads php forum software // 7.6.2 Changelog
Re: How to adjust image pixel dimensions for 6.7.1.1 [Re: Digitalgas] #261182
02/22/18 01:28 PM
02/22/18 01:28 PM
Joined: Jun 2006
Posts: 591
Sweden
Morgan Offline
addict
Morgan  Offline
addict
Joined: Jun 2006
Posts: 591
Sweden
Thank you smile


Morgan Johansson
BritBike Forum
http://www.britbike.com/forums/ubbthreads.php?
Re: How to adjust image pixel dimensions for 6.7.1.1 [Re: Digitalgas] #261183
02/22/18 02:27 PM
02/22/18 02:27 PM
Joined: Apr 2004
Posts: 1,172
California
isaac Offline
UBB.threads Developer
isaac  Offline
UBB.threads Developer
Joined: Apr 2004
Posts: 1,172
California
@Morgan,

I sent you a PM with some links. Cheers laugh


isaac @ id242.com // forum @ CelicaHobby.com
a current developer of UBB.threads php forum software // 7.6.2 Changelog

Shout Box
Today's Birthdays
No Birthdays
Recent Topics
Control Panel / Transactions Username
by Morgan. 06/20/18 05:38 AM
Custom Insert won't save
by Baldeagle. 06/18/18 07:44 PM
New Image capabilities ver 7.6.1
by Abbott. 06/14/18 02:28 PM
Thread deleted?
by Lisanne. 06/05/18 11:13 AM
Forum Statistics
Forums36
Topics35,123
Posts191,338
Members12,088
Most Online978
Jun 24th, 2007
Random Image
Powered by UBB.threads™ PHP Forum Software 7.6.2
(Preview build 20180524)