thumbnails

Resize image maintaining aspect ratio AND making portrait and landscape images exact same size?

穿精又带淫゛_ 提交于 2019-12-17 17:58:09
问题 Currently I am using: os.chdir(album.path) images = glob.glob('*.*') # thumbs size size = 80,80 for image in images: #create thumb file, ext = os.path.splitext(image) im = Image.open(os.path.join(album.path,image)) im.thumbnail(size, Image.ANTIALIAS) thumb_path = os.path.join(album.path, 'thumbs', file + ".thumb" + ".jpeg") im.save(thumb_path) Although this works, I end up with different sizes images (some are portrait and some are landscape), but I want all of the images to have an exact

What is the “best” way to create a thumbnail using ASP.NET? [closed]

倾然丶 夕夏残阳落幕 提交于 2019-12-17 17:26:56
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 2 years ago . Story: The user uploads an image that will be added to a photo gallery. As part of the upload process, we need to A) store the image on the web server's hard drive and B) store a thumbnail of the image on the web server's hard drive. "Best" here is defined as Relatively easy

FFMPEG: Extracting 20 images from a video of variable length

青春壹個敷衍的年華 提交于 2019-12-17 15:34:54
问题 I've browsed the internet for this very intensively, but I didn't find what I needed, only variations of it which are not quite the thing I want to use. I've got several videos in different lengths and I want to extract 20 images out of every video from start to the end, to show the broadest impression of the video. So one video is 16m 47s long => 1007s in total => I have to make one snapshot of the video every 50 seconds. So I figured using the -r switch of ffmpeg with the value of 0

Extract thumbnail for any file in Windows

寵の児 提交于 2019-12-17 10:30:32
问题 What's the most efficient way of extracting thumbnails from any file, not just just images at varying sizes? I've looked all over, most promising of which was Windows API ShellFile yet this didn't appear to install properly. I'm using windows 7. 回答1: Some time ago I wrote a ThumbnailProvider that loads a thumbnail from the Win API. Supports transparent images. This is the implementation: using System; using System.Drawing; using System.Drawing.Imaging; using System.Runtime.InteropServices;

HTML : Is there any way to show images in a textarea?

依然范特西╮ 提交于 2019-12-17 06:37:14
问题 So I want to show image thumbnails too in the <textarea> along with text. If you know a javascript solution that's perfect too(if possible in vanilla JS). Like this: __________________ |Hello World | | _______ | | | Img | | | | | | | |_____| | |Hello again. | | _______ | | | Img2| | | | | | | |_____| | |________________| As I know and seen in a div or anything what has contentEditable="true" allows image too but, allows many other HTML tags and a lots of things what I don't want :| I want

Get thumbnail Uri/path of the image stored in sd card + android

别说谁变了你拦得住时间么 提交于 2019-12-17 05:40:52
问题 SDK version - 1.6 I am using following intent to open android's default gallery: Intent intent = new Intent(); intent.setType("image/*"); intent.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult( Intent.createChooser(intent, "Select Picture"), 101); Now in onActivityResult , i am able to get the original Uri and path of the selected image, but i am not able to get the Uri and path of the thumbnail of selected image. Code for getting the original image Uri and path: @Override

Is it possible to Generate a thumbnail from a video url in android

走远了吗. 提交于 2019-12-17 03:08:10
问题 I am working on a video app. I am streaming a video from server link , is it possible for me to generate a video thumbnail from the URL without downloading the video. 回答1: Without downloading video you can generate thumbnail from below code: public static Bitmap retriveVideoFrameFromVideo(String videoPath) throws Throwable { Bitmap bitmap = null; MediaMetadataRetriever mediaMetadataRetriever = null; try { mediaMetadataRetriever = new MediaMetadataRetriever(); if (Build.VERSION.SDK_INT >= 14)

Get img thumbnails from Vimeo?

风格不统一 提交于 2019-12-17 02:24:45
问题 I want to get a thumbnail image for videos from Vimeo. When getting images from Youtube I just do like this: http://img.youtube.com/vi/HwP5NG-3e8I/2.jpg Any idea how to do for Vimeo? Here is same question, without any answer. 回答1: From the Vimeo Simple API docs: Making a Video Request To get data about a specific video, use the following url: http://vimeo.com/api/v2/video/video_id.output video_id The ID of the video you want information for. output Specify the output type. We currently offer

How to Make Pop-Up Title Card on Hover?

蹲街弑〆低调 提交于 2019-12-13 23:22:14
问题 So for my website, I have a portfolio page and I want to design a simple image thumbnail for my Google doc or Word documents to link essays and stuff. The same for PDFs, Slides, etc. I want the logo or letter to be shown and when you hover on it, I want a title card to "pop" up and like bounce up a bit and then when you hover off, I want the card to slide down and disappear. In theory, this is what I want it to look like: Whether it just slides up and then slides down or shoots up, bounces

how to create a thumbnail, at the time of video upload ? [php / codeigniter]

梦想与她 提交于 2019-12-13 16:07:32
问题 I am trying to create a thumbnail for my uploading video. searching for easiest way to generate thumbnail at the time of video upload itself. i think if some provide the code without using ffmpeg will be life saving for me. because i'm running my code on windows wamp or any other alternative welcomed too thank you. my real code is in CodeIgniter, not able to figure out how to do it. $postname = $this->input->post('post-name'); $configVideo['upload_path'] = './video'; $configVideo['max_size']