Advanced search  

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

Pages: 1 [2] 3   Go Down

Author Topic: Custom Thumbnail for cpg1.5.x  (Read 85402 times)

0 Members and 1 Guest are viewing this topic.

cl9m

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 118
Re: Custom Thumbnail for cpg1.5.x
« Reply #20 on: June 30, 2010, 03:13:00 pm »

ok sorry, I am wrong.
If I want watermark on thumbnails it's just differing picture thumb and movie thumb
I used watermark for put a icon movie on other file as picture.

(sorry for my english) :-\
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Custom Thumbnail for cpg1.5.x
« Reply #21 on: June 30, 2010, 03:22:11 pm »

I used watermark for put a icon movie on other file as picture.
That's of course a feature request for this plugin.

If a user uploads a custom thumbnail for a movie we could add a film strip overlay to the thumb. I currently do this client-sided (before I upload that thumbnail). But we have to consider different video dimensions (4:3, 16:10, 16:9, etc.).
Logged

cl9m

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 118
Re: Custom Thumbnail for cpg1.5.x
« Reply #22 on: July 01, 2010, 03:00:30 pm »

ok thanks for your answers.
Logged

cavok

  • Coppermine regular visitor
  • **
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 93
Re: Custom Thumbnail for cpg1.5.x
« Reply #23 on: November 30, 2010, 12:06:28 pm »

I use Custom Thumbnail plugin as recommended with plugin Flash Media Player plugin with visual integration (play flv/mp4/mp3/aac files), but when I view the video page /coppermine/displayimage.php, after the video (when an automatic start) is the thumbnail that appears in large format.
So the quality is really bad. Can not we create an intermediate image of better quality?

Thank's
Logged
Coppermine 1.5.22 hosting by Free

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Custom Thumbnail for cpg1.5.x
« Reply #24 on: November 30, 2010, 02:46:08 pm »

Open codebase.php, find
Code: [Select]
resize_image($thumb, $thumb, $CONFIG['thumb_width'], $CONFIG['thumb_method'], $CONFIG['thumb_use']);and replace with
Code: [Select]
$resize_method = $CONFIG['picture_use'] == "thumb" ? ($CONFIG['thumb_use'] == "ex" ? "any" : $CONFIG['thumb_use']) : $CONFIG['picture_use'];
resize_image($thumb, $thumb, $CONFIG['picture_width'], $CONFIG['thumb_method'], $resize_method);
Logged

cavok

  • Coppermine regular visitor
  • **
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 93
Re: Custom Thumbnail for cpg1.5.x
« Reply #25 on: December 17, 2010, 02:52:02 pm »

The image to replace the video in the page /coppermine/displayimage.php, at the end of the video
with this modification is of good quality now.

But unfortunately, now in the FilmStrip is a great image that appears, and is less well.
But perhaps this new problem is generated by other change Film strip - Overlap Thumbails
Logged
Coppermine 1.5.22 hosting by Free

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Custom Thumbnail for cpg1.5.x
« Reply #26 on: December 17, 2010, 03:08:02 pm »

In that case you'll have to do more things.

I assume you're using unmodified versions of the both plugins.

First you have to modify the Custom Thumbnail plugin to create a thumbnail and an intermediate-sized image. Then you have to modify the Flash Media Player plugin to use the intermediate-sized image as preview image for the video.

Please give me some time and I'll release new packages of both plugins. I don't know if I find some time this weekend, but I think I'll solve it this year ;)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Custom Thumbnail for cpg1.5.x
« Reply #27 on: December 22, 2010, 03:50:38 pm »

Version 1.7 (attached to initial post) has a new option to create an additional intermediate-sized picture. It's now also compatible with the sef_url plugin.
Logged

cavok

  • Coppermine regular visitor
  • **
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 93
Re: Custom Thumbnail for cpg1.5.x
« Reply #28 on: December 23, 2010, 08:26:51 pm »

Thank you, works perfectly with Flash Media Player plugin with a new option to create intermediate picture.
Logged
Coppermine 1.5.22 hosting by Free

shortmort37

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 98
Re: Custom Thumbnail for cpg1.5.x
« Reply #29 on: December 30, 2010, 03:47:32 pm »

Αndré,

I love this mod - it works great.

This was discussed in another thread, but - it would be really cool if, in addition to being able to assign a custom thumbnail to a video or file, you could also do so to a category.  e.g., I have a category for my Plymouth Gallery for the Sport Fury model, and categories underneath for individuals owning that model, with their albums under that.  I'd like to show a stylized thumbnail for the category, as in the attachment.

Perhaps if I knew how difficult that might be, I wouldn't even post the suggestion!  But I'm out of my depth in terms of doing it myself.  Just thought I'd ask!

Thanks
Dan
Logged

shortmort37

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 98
Re: Custom Thumbnail for cpg1.5.x
« Reply #30 on: December 30, 2010, 03:50:33 pm »

I'd like to show a stylized thumbnail for the category, as in the attachment.

Oops!  Sans attachment.  I also neglected to add:  I'd like for the thumbnail to not be constrainted to already be in any set underneath it.  With that constraint, it must also exist within an album that is exposed to all users, and I'd prefer not to create an album with category icons only.

Thanks
Dan
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Custom Thumbnail for cpg1.5.x
« Reply #31 on: December 30, 2010, 04:15:22 pm »

shortmort37, that's not what this plugin was designed for. It's only a user-friendly interface for the already built-in mechanism of custom thumbnails. I don't know exactly what we discussed in the thread you mentioned, but I think what you tried to do isn't possible by default. Please start a new thread in the plugins board or in the feature requests board if you want to be able to do what you want to do in the future.
Logged

shortmort37

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 98
Re: Custom Thumbnail for cpg1.5.x
« Reply #32 on: December 31, 2010, 03:25:21 am »

Logged

Templarart

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Custom Thumbnail for cpg1.5.x
« Reply #33 on: January 20, 2011, 04:37:16 pm »

Great plugin - exactly what I needed.  Here's a quick question/problem.  Do the dimensions of the new thumb have to stay the same as the dimensions of the old thumb?  I just tried replacing a tall, rectangular thumb with a square thumb and the square thumb was squished horizontally to the dimensions of the old thumb's tall rectangle.  Is this just unavoidable or am I doing something wrong?  Thanks.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Custom Thumbnail for cpg1.5.x
« Reply #34 on: January 20, 2011, 04:50:40 pm »

The thumbnail will always be resized to the values you specified in Coppermine's config. At least this is how the plugin should work by design.
Logged

Templarart

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Custom Thumbnail for cpg1.5.x
« Reply #35 on: January 21, 2011, 04:01:11 pm »

"The thumbnail will always be resized to the values you specified in Coppermine's config. At least this is how the plugin should work by design."

Right, that's a given - let's say 120 on the longest side.  What I'm wondering about is the proportions.  As I look at the thumbs in my gallery I see squares (120x120), long rectangles (120xwhatever) and tall rectangles (whateverx120).  I was trying to substitute a square (120x120) for a tall rectangle (70x120).  When I uploaded a square thumb (120x120), it was squished into the proportions of the original thumb (70x120).  If this is unavoidable... oh well, but I was hoping it was just a mistake I was making.

Thank you for your prompt reply.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Custom Thumbnail for cpg1.5.x
« Reply #36 on: January 21, 2011, 04:16:07 pm »

Please post a link to your gallery, especially to a thumbnail which doesn't have the correct size after you updated it with the plugin.
Logged

Alu

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Custom Thumbnail for cpg1.5.x
« Reply #37 on: April 18, 2011, 11:12:28 am »

Is there a way to prevent it from converting it to .jpg if I upload .png?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Custom Thumbnail for cpg1.5.x
« Reply #38 on: April 18, 2011, 03:18:52 pm »

Is there a way to prevent it from converting it to .jpg if I upload .png?

Open codebase.php, find
Code: [Select]
                if (!is_image($row['filename'])) {
                    $path_parts = pathinfo($row['filename']);
                    $row['filename'] = str_replace($row['filename'], basename($row['filename'], '.'.$path_parts['extension']).'.jpg', $row['filename']);
                }
and replace with
Code: [Select]
                if (!is_image($row['filename'])) {
                    $imginfo = cpg_getimagesize($fileupload['tmp_name']);
                    switch ($imginfo[2]) {
                        case '1': $extension = '.gif'; break;
                        case '3': $extension = '.png'; break;
                        default:  $extension = '.jpg'; break;
                    }
                    $path_parts = pathinfo($row['filename']);
                    $row['filename'] = str_replace($row['filename'], basename($row['filename'], '.'.$path_parts['extension']).$extension, $row['filename']);
                }

Note: it only works if you upload a custom thumbnail for non-images, as Coppermine assumes the same file type for images and their thumbnails. Additionally if you upload more than one custom thumbnail for the same file (with different extensions) more than one thumbnail for the same file may exists. In that case the standard routine of detecting custom thumbnails applies (GIF -> PNG -> JPG).
Logged

WillyWonderDog

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Posts: 19
Re: Custom Thumbnail for cpg1.5.x
« Reply #39 on: August 25, 2014, 06:32:23 pm »

Plugin works great. Thank you.  Of course I have a question though, what is the proper way to remove a custom thumbnail? I see how to change the custom thumbnail if desired by uploading a new image for it, but I can't figure out how to properly remove a custom thumbnail (and let it go back to the system thumbnail).
Logged
Pages: 1 [2] 3   Go Up
 

Page created in 0.037 seconds with 20 queries.