thumbnails

WordPress - Cropping thumbnails without losing quality

混江龙づ霸主 提交于 2019-12-24 02:23:44
问题 I have a website on which there is a "shop" page. Each product has a thumbnail assigned to it. I set a custom thumbnail size with this code: if ( function_exists( 'add_image_size' ) ) { add_image_size( 'products', 150, 84, true ); } Cropping works fine, but when the image is too tall WordPress crops it to the "height" parameter and the final result is a thumbnail too narrow to look good. Is there a way to make WordPress select a part of an image (150x84 px fragment) and use it as a thumbnail

Overlay a play icon on top of thumbnail with css

瘦欲@ 提交于 2019-12-24 00:56:42
问题 I trying to overlay a play icon on top of thumbnail with css, but not successful. <ul class="thumb-grid"> <li class="play-icon"><img src="image.url"/></li> </ul> You can see the icon when hovering but can't get the icon to go on top of the thumbnail. Does anyone know how? Here is the Fiddle 回答1: Use a pseudo element and change the position style. To preserve your hovering effect you can attach the :hover selector to the list item and target the img inside: html, body { margin: 0; padding: 0;

How to get video thumbnail (frame) from live video url

浪子不回头ぞ 提交于 2019-12-23 20:21:06
问题 I have video uploaded on server. which is trailer of movie. I can play this video direct to my videoView with the help of live url. My question: is there any method in android which help me out to get a video frame from url without download the video to local storage. I know one method name "createvideothumbnail" but it will not work in my case. because i need to get the video thumbnail without download the whole video. as you have seen the mechanism is implemented in imdb official app

Thumbnails from the Vimeo website harder than YouTube

落爺英雄遲暮 提交于 2019-12-23 20:09:25
问题 Merged with Get img thumbnails from Vimeo?. Our website lets people add videos by submitting a URL - usually one from YouTube or Vimeo. I'd like to show thumbnails, when giving people a list of videos. YouTube make this easy for me - just slap "1.jpg" on the end of the URL, and you've got your image. Vimeo seem to want me to make a HTTP request, and extract the thumbnail URL from the XML they return - what? Who's got time for that?!!! Plus, I'd have to store these URLs too, I can't get them

Android how can i get thumb image of video file from gallery

那年仲夏 提交于 2019-12-23 18:12:25
问题 I need to show the selected video file from gallery in my listview. I have successfully fetched the uri of video file but i am not able to get the thumb image of video file. Here is the code i have used for fetching image of video file from uri, but is causes the app to crash. Is there any other way to get image of video file..? please assist me if it can be achieved in any other way.... public static String getFileMetaData(Context context,String uri){ Uri queryUri = Uri.parse(uri); // Get

listview with multiple imagelist and icons/image

笑着哭i 提交于 2019-12-23 15:44:15
问题 i need a way to use two imagelist on a listview. one of the image list if for header icons which contain 16x16 icons, and another will contains 32x32 thumbnail pictures within the sub items. The image below shows what am trying to do 回答1: i found a trick which solves the issue. the trick is to create a 16x16 icon on a 32x32 canvas and center it. this is because the thumbnail size is 32bit max. so i have one image list for 16pix isonc and another for 32pix icons when thumbnail is needed, i

Error while creating thumbnail in php for multiple image upload

不羁岁月 提交于 2019-12-23 12:34:05
问题 I use following code to upload, rename, compress, create thumbnail everything works fine, And recently i noticed while creating thumb it creates fresh copy of thumb images for previously uploaded images also(create thumbnail for uploaded and uploading images too) Problem: When form is submitted it crates thumb for uploading image and uploaded images(image file that are present in older). how do i solve this problem if (!empty($_POST)) { if (isset($_FILES['files'])) { $uploadedFiles = array();

Having an image file buffer in memory, what is the fastest way to create its thumbnail?

拜拜、爱过 提交于 2019-12-23 08:44:30
问题 Trying to create a an image acquiring application optimized for a fast scanner (which can provide up to 6 compressed images [color+gray+binary][front+rear] for each paper at speed of 150 ppm) I have some speed issues. Using TWAIN technology and memory buffer transfer mode (TWSX_MEMORY) I receive image buffer (as JPEG or TIFF file loaded in memory) from scanner and save it to my application destination path. If I do not want to create thumbnails, my application causes no speed loss for the

Android, media scan doesn't generate thumbnails?

大憨熊 提交于 2019-12-23 05:34:13
问题 I have image files which don't have thumbnails. (imported from my external carmera using NFC) I want to create thumbnails for my image picker view. (has to be fast) At this moment, I'm not even sure "MEDIA SCAN" means "generating thumbnail" or what. I tried to scan file using mMediaScannerConnection.scanFile(mPath, null); onScanCompleted gets called and I try to get thumbnail using the following two version of functions. I get null thumbnailPath for both functions, I don't get why.. private

PHP Image cropping to square

你离开我真会死。 提交于 2019-12-23 05:20:34
问题 I was using the following PHP script to create square thumbnails which I got here http://www.abeautifulsite.net/blog/2009/08/cropping-an-image-to-make-square-thumbnails-in-php/ I was able to integrate this into my image upload script, which uploads full sized image and after that takes the uploaded image and creates a thumbnail from that. The problem is the author of the script said, it will crop landscape and portrait images without problem. It crops landscape images perfectly, but as it