Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4255
Latest: andreios
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43259
Total Topics: 7518
Most Online Today: 177
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 185
Total: 185

Author Topic: Is there an option to remake all images that weren't made in medium?  (Read 4765 times)

0 Members and 1 Guest are viewing this topic.

Offline shuban

  • Hero Member
  • *****
  • Posts: 665
    • View Profile
    • Biology Forums
Was wondering if there is a hidden function that could recreate all images that didn't have the Medium setting to be created into Medium sized

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Is there an option to remake all images that weren't made in medium?
« Reply #1 on: February 21, 2017, 12:02:59 pm »
There is the regenerate thumbnail option on a category level that will rebuild thumbnails and medium images.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline shuban

  • Hero Member
  • *****
  • Posts: 665
    • View Profile
    • Biology Forums
Re: Is there an option to remake all images that weren't made in medium?
« Reply #2 on: February 21, 2017, 12:07:59 pm »
Amazing!

How does it work exactly, it will loop through every image in the gallery directory (where the images are stored), and create the medium and thumbnails?

1) Will it change the pathway of the original? (I'm hoping it won't)
2) Have you tested it on a gallery with greater than 20,000 images?
3) How many will it do at a time?
4) How long will it take?

On a side note, Aviary is no longer supported - they were bought out I think

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Is there an option to remake all images that weren't made in medium?
« Reply #3 on: February 21, 2017, 12:11:47 pm »
It goes to though each image in that category

1. it keeps the same filename.
2. i don't think so. Did a few thousand
3. it does 25 per page it has a progress bar
4. a long time if you are doing 20,0000....


Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline shuban

  • Hero Member
  • *****
  • Posts: 665
    • View Profile
    • Biology Forums
Re: Is there an option to remake all images that weren't made in medium?
« Reply #4 on: February 21, 2017, 12:29:13 pm »
I will try one category first. Thanks

Offline shuban

  • Hero Member
  • *****
  • Posts: 665
    • View Profile
    • Biology Forums
Re: Is there an option to remake all images that weren't made in medium?
« Reply #5 on: February 21, 2017, 02:28:00 pm »
Is there a way we can skip gifs from being remade into medium sized ones? Because if they are an animated gif, it kills the animation.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Is there an option to remake all images that weren't made in medium?
« Reply #6 on: February 21, 2017, 02:31:29 pm »
You would to modify the query to look at the filename
filename NOT LIKE "%.gif"
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline shuban

  • Hero Member
  • *****
  • Posts: 665
    • View Profile
    • Biology Forums
Re: Is there an option to remake all images that weren't made in medium?
« Reply #7 on: February 21, 2017, 02:36:04 pm »
Something seems wrong

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Is there an option to remake all images that weren't made in medium?
« Reply #8 on: February 21, 2017, 02:39:58 pm »
Put it in single quotes '
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/
Agree Agree x 1 View List

Offline shuban

  • Hero Member
  • *****
  • Posts: 665
    • View Profile
    • Biology Forums
Re: Is there an option to remake all images that weren't made in medium?
« Reply #9 on: February 21, 2017, 02:40:32 pm »
Thank you!

Offline shuban

  • Hero Member
  • *****
  • Posts: 665
    • View Profile
    • Biology Forums
Re: Is there an option to remake all images that weren't made in medium?
« Reply #10 on: February 21, 2017, 02:55:43 pm »
What I did instead was this:

Code: [Select]
function DoWaterMark($filename)
{
global $modSettings;

// Do not watermark GIFs
if (preg_match('/(\.gif)$/i', $filename))
return;

if (empty($modSettings['gallery_set_water_enabled']))
return;

// Picture watermark
if ($modSettings['gallery_set_water_image'] != '')
{
// If the image exists
if (file_exists($modSettings['gallery_set_water_image']))
{
$photo = new imagick_watermark($filename);
$photo->watermark($modSettings['gallery_set_water_image'], $modSettings['gallery_set_water_alignment'], $modSettings['gallery_set_water_transparency'], $modSettings['gallery_set_water_scale'], false);
$photo->writeImage($filename);
}
}
}

I think this should be implemented into your software.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Is there an option to remake all images that weren't made in medium?
« Reply #11 on: February 21, 2017, 03:06:47 pm »
Yeah that would fix the animated gif issue. I do have a class that checks for resizing for animated gifs.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline shuban

  • Hero Member
  • *****
  • Posts: 665
    • View Profile
    • Biology Forums
Re: Is there an option to remake all images that weren't made in medium?
« Reply #12 on: February 21, 2017, 03:08:49 pm »
Yeah that would fix the animated gif issue. I do have a class that checks for resizing for animated gifs.

Currently in the software?

The watermark mucks it up, unfortunately

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Is there an option to remake all images that weren't made in medium?
« Reply #13 on: February 21, 2017, 03:12:05 pm »
Yes it is built in.  The watermark would affect the image do the resizing.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline shuban

  • Hero Member
  • *****
  • Posts: 665
    • View Profile
    • Biology Forums
Re: Is there an option to remake all images that weren't made in medium?
« Reply #14 on: February 21, 2017, 03:13:26 pm »
I remember you putting that it. The only thing I still need to fix is the issue with transparent png's becoming black

 

Related Topics

  Subject / Started by Replies Last post
No medium images

Started by clothahump « 1 2 3 » Support

34 Replies
15459 Views
Last post February 02, 2011, 06:10:33 pm
by GenoDemoN
1 Replies
3798 Views
Last post May 28, 2014, 08:54:56 am
by SMFHacks
6 Replies
4050 Views
Last post October 22, 2014, 09:13:40 am
by shuban
2 Replies
2452 Views
Last post September 02, 2017, 02:08:41 pm
by shuban
2 Replies
1773 Views
Last post July 12, 2022, 09:23:24 am
by mickjav

+- Recent Topics

No thumbnails on new uploads by SMFHacks
March 27, 2024, 02:10:41 pm

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

Powered by EzPortal