Menu
  • HOME
  • TAGS

Force Sonata to rebuild thumbs

php,symfony2,thumbnails,sonata

This worked for me: php app/console sonata:media:sync-thumbnails sonata.media.provider.image default ...

how to display video thumbnails using Universal Image Loader

android,thumbnails,universal-image-loader

You have two way : A: Use simple method to set adapter Please set bitmap in image using method setImageBitmap(). If you want set bitmap in universal image downloader. Create a method in universal class public void setImageThumbnail(String videoPath, ImageView imgView) { Bitmap b=ThumbnailUtils.createVideoThumbnail(videoPath,MediaStore.Images.Thumbnails.MICRO_KIND); imgView.setImageBitmap(b); } use this method where...

Wordpress thumbnail from category as background div

php,wordpress,background,thumbnails

You are calling the Query after you have created the thumbnail. The Query should wrap the div. Try: <?php $cat_id = 3; //the certain category ID $latest_cat_post = new WP_Query( array('posts_per_page' => 1, 'category__in' => array($cat_id))); if( $latest_cat_post->have_posts() ) : while( $latest_cat_post->have_posts() ) : $latest_cat_post->the_post(); ?> <div<?php if ( $thumbnail_id...

WordPress onepage thumbnail

wordpress,thumbnails,onepage

Try this code <?php $args = array( 'sort_order' => 'ASC', 'sort_column' => 'menu_order', //post_title 'hierarchical' => 1, 'exclude' => '', 'child_of' => 0, 'parent' => -1, 'exclude_tree' => '', 'number' => '', 'offset' => 0, 'post_type' => 'page', 'post_status' => 'publish' ); $pages = get_pages($args); //start loop foreach ($pages as...

Fancybox thumbnails not working

javascript,php,fancybox,thumbnails

I optimize the answer to use with any folders and images you want in diferent galleries. Down side is when you close the gallery you have to open the folders iframe again. Im working on looking how to make the folders iframe open when you close the gallery. Eitherway, here...

Fixed thumbnail ratio size & maintaining aspect ratio?

html,css,thumbnails,aspect-ratio,ratio

I think This is the result you are trying to acheive. I added a div.img-wrapper around each thumb and some css magic HTML <div id="container"> <div class="col-4"> <div class="img-wrapper"> <a class="thumb" href="#"> <img src="http://mintywhite.com/wp-content/uploads/2012/10/fond-ecran-wallpaper-image-arriere-plan-hd-29-HD.jpg"> <div class="caption">Project untitled<br> Category</div> </a> </div> </div> <div class="col-4"> <div class="img-wrapper"> <a...

Wordpress page thumbnail not showing

wordpress,thumbnails

The problem was that I write the code inside single.php but there was also a page.php. After adding the code to page.php everything went perfect.

Memory spike when reading multiple image files

c#,image,winforms,memory,thumbnails

You are creating Images and Bitmaps without disposing them, so until the garbage collector destroys those bmp's they are in memory. Also, in some cases you are reading all the image file in memory, loading it into an stream and then passing it to Image.FromStream, is a lot better to...

Convert GD image resizer to the equivalent ImageMagick with bicubic sharper

php,imagemagick,jpeg,gd,thumbnails

I have modified it myself using ImageMagick. Much sharper and nicer output than GD. Below is the modified version. Hope this may help others. <?php if (isset($_GET['image']) && isset($_GET['width']) && is_numeric($_GET['width']) ) { // Get image name $original_image = $_GET['image']; // Watermarks $wmark='watermark.png'; //largest watermark $wmarkm='watermark_m.png'; //medium watermark $wmarks='watermark_s.png'; //smallest...

Android video thumbnail is null

android,bitmap,thumbnails,video-thumbnails

Try: public String getPathFromURI(Uri uri) { Cursor cursor = getContentResolver().query(uri, null, null, null, null); //Source not from device capture or selection if (cursor == null) { return uri.getPath(); } else { cursor.moveToFirst(); int idx = cursor.getColumnIndex(MediaStore.MediaColumns.DATA); if ( idx == -1 ) { return uri.getPath(); } String path = cursor.getString(idx);...

jssor thumbnail css transform error

thumbnails,jssor

Please set $HWA to false to disable hardware acceleration. var options = { ..., $ThumbnailNavigatorOptions: { ... $HWA: false, ... } }; I will disable hardware acceleration for thumbnails by default for later updates....

Getting thumbnail from video url and loading on gridview very slow

android,gridview,video,adapter,thumbnails

Move ThumbnailUtils.createVideoThumbnail() off of the main application thread. In this sample project, I used the SmartImageView library to load the thumbnails asynchronously, applying my custom VideoThumbnailImage as a ViewBinder on my SimpleCursorAdapter showing the results of finding all videos: private static class ThumbnailBinder implements SimpleCursorAdapter.ViewBinder { @Override public boolean setViewValue(View...

How to pass the URL of Image when Thumb is clicked in Listview of Android

android,json,image,listview,thumbnails

Finally I got the Solution: public void onClick_preview(View v) { for(int p=0;p<=albumList.size();p++) { String animation_id=albumList.get(p).get("anim_id"); if(Integer.parseInt(animation_id)==global_position) { animation_url=albumList.get(p).get("anim_url"); break; } } Intent i=new Intent(ECard_main.this,Preview.class); i.putExtra("Catagories", catagories); i.putExtra("Web_Url", animation_url); startActivity(i); } ...

Fotorama show thumbnail with one image

php,thumbnails,fotorama

Use enableifsingleframe flag: <div class="fotorama" data-enableifsingleframe="true"> <img src="1.jpg"> <img src="2.jpg"> </div> ...

Upload image to Cloudinary and generate a low-res version as a different URL at the same time

android,image,file-upload,thumbnails,cloudinary

As Cloudinary's transformation string is included in the URL itself, the transformed image's URL is different than the original one. For example: http://res.cloudinary.com/demo/image/upload/sample.jpg vs.: http://res.cloudinary.com/demo/image/upload/w_200/sample.jpg

Owl Carousel custom thumbnail background image disappears on window resize

jquery,resize,thumbnails,carousel,owl-carousel

I suspect putting "afterUpdate: afterOWLinit" in your owl config will solve your problem. I'm just doing something really similar myself and discovered that after a few hours going round in circles trying to solve this one.

findViewById returning null CustomSource cadslib

android,thumbnails,cardslib

When extending Card, you have to call super by passing the layout reference you want to inflate. I see in your OfertasCardCustomSource class that you have two constructors, one of them receiving a variable innerLayout which is correctly passed to the super class and another constructor that does not set...

How to add auto scroll inside bootstrap thumbnail class

html,css,twitter-bootstrap,thumbnails,autoscroll

try this <div class="container"> <div class="row"> <div class="thumbnail"> <div class="thumbnail"> <img class="small-image" src="http://marccortez.com/wp-content/uploads/2013/04/reading-small1.jpg"/> </div> <div class="thumbnail editor"> <div class="progress-broad"> <div class="progress-bar progress-bar-success" style="width:70%"> </div> <div class="progress-bar progress-bar-warning progress-bar-striped" style="width:10%"> </div> <span...

In need of JPEG test images with exif thumbnaill in none-compressed TIFF format

testing,jpeg,thumbnails,exif

You can find a couple in my project here: https://github.com/haraldk/TwelveMonkeys/tree/master/imageio/imageio-jpeg/src/test/resources/jpeg At least exif-rgb-thumbnail-bad-exif-kodak-dc210.jpg and exif-rgb-thumbnail-sony-d700.jpg should contain RGB (uncompressed) thumbnails in the Exif segment. The first one really has a non-compliant Exif (bad TIFF) segment though. ...

How to control HTML output of variable $image in WooCommerce

wordpress,woocommerce,thumbnails

HTML5Blank has a pretty good example that should answer some of your questions, take a look here - spefically line 206 and the actions it's hooked into: add_filter('post_thumbnail_html', 'remove_width_attribute', 10 ); function remove_width_attribute( $html ) { $html = preg_replace( '/(width|height)="\d*"\s/', "", $html ); return $html; } To specifically target the...

Unable to display thumbnail in another view controller

ios,objective-c,avfoundation,thumbnails,cgimageref

Solved it ! Credits to David and Dan :) MainViewController.h @property (weak, nonatomic) IBOutlet UIImageView *thumbnailAV; MainViewController.m AVURLAsset *asset1 = [[AVURLAsset alloc] initWithURL:[self outputURL] options:nil]; AVAssetImageGenerator *generate1 = [[AVAssetImageGenerator alloc] initWithAsset:asset1]; generate1.appliesPreferredTrackTransform = YES; NSError *err = NULL; CMTime time = CMTimeMake(1, 2); CGImageRef oneRef = [generate1 copyCGImageAtTime:time actualTime:NULL error:&err];...

CFPDF with PNG: transparency is black. With PDF it's white

pdf,coldfusion,thumbnails,watermark,cfpdf

I found a fix to my own issue. The best way that I found to accomplish this was to created the PDF's into images and then use Coldfusion's imaging to add the watermark to the images. <cfloop query="jpgfiles"> <cfset theFile = directory & "/" & name> <cfset imgFile = imageRead(theFile)>...

create thumbnail with php imagejpeg - getting error “failed to open stream: Permission denied”

php,thumbnails

Just for the record. The issue was with the destination path for the thumbnail. My original code had only the directory. I was wrongly assuming that the name would be the same as the original file and would be automatically created. Not so. So here it is the working code:...

How remove margin of Thumbnails Bootstrap

jquery,html,css,twitter-bootstrap,thumbnails

You will need to use a JS plugin like Masonry or Isotope to get that type of look.

What's a good PHP alternative to Timthumb for creating thumbnails? [closed]

php,caching,thumbnails,timthumb

https://github.com/avalanche123/Imagine Best image processing lib for a few years now. OOP, unit tested, easy to use and MIT licensed. If someone knows another one of the same quality I would be surprised and like to know about it as well. :)...

Unable to enable Feature Image

php,thumbnails

you are just missing a second parameter from the call: add_theme_support( 'post-thumbnails', array( 'post' ) ); That will enable featured images for posts. If you want to add them on pages change post to page. edit the second parameter needs to be an array...

How to set the Thumbnail Image for Share Buttons from a site's Home Page to the Page being Shared

thumbnails,sharethis,facebook-share

Social sharing sites like Facebook and LinkedIn tend to respect schema.org schemas. So I tend to slap SoftwareApplication on my body then use a hidden div, putting what I want shared in there. You could manually (or programmatically) take a snapshot of the page and include it in the schema...

Explorer Wont Release Files After Using My Thumbnail Provider

c#,.net,thumbnails

Turns out you need to release the COM IStream object that you get from IInitializeWithStream. I came to this conclusion by reading more about disposing COM objects. Proper way of releasing COM objects? I followed MS's example on how to wrap IStream https://msdn.microsoft.com/en-us/library/jj200585%28v=vs.85%29.aspx public class StreamWrapper : Stream { private...

Adding Youtube thumbnail on UICollectionView in swift

swift,youtube,uicollectionview,thumbnails,youtube-data-api

A solution using tuplets rather than two separate arrays let videoData = [("First Video", "sGF6bOi1NfA/0"), ("Second Video","y71r1jhMdRk/0"), ("Third Video", "qfsRZsvraD8/0")] func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { let cell: SongCollectionView = collectionView.dequeueReusableCellWithReuseIdentifier("Cell", forIndexPath: indexPath) as! SongCollectionView let (name, token) = videoData[indexPath.row] cell.labelCell.text = name let imageData =...

MediaWiki SVG thumbnailing

svg,thumbnails,mediawiki

There are several solutions to this problem. Thumbnailing For 64-bit Windows 7, like what I am running the best solution is to add this to LocalSettings.php: $wgSVGConverters = array( 'ImageMagick' => 'convert -resize $width $input $output', 'Inkscape' => '"/Program Files (x86)/Inkscape/inkscape.com" -z -w $width -f $input -e $output', ); ImageMagick...

iOS Thumbnail from Amazon S3 MP4/MOV URL

ios,amazon-s3,thumbnails

you could get thumbnails using AVFoundation with any time, any size you want: AVURLAsset *asset=[[AVURLAsset alloc] initWithURL:yourVideoUrl options:nil]; AVAssetImageGenerator *generator = [[AVAssetImageGenerator alloc] initWithAsset:asset]; generator.appliesPreferredTrackTransform = YES; CMTime thumbTime = CMTimeMakeWithSeconds(5,30); AVAssetImageGeneratorCompletionHandler handler = ^(CMTime requestedTime, CGImageRef im, CMTime actualTime, AVAssetImageGeneratorResult result, NSError *error){ NSLog(@"make sure generator is used in...

cropping center square of image using imagecopyresampled

php,thumbnails,crop,resize-crop

I think you are going wrong in your thumb1_tmp_img near the end. I made this a class so I didn't have to duplicate so much like you have, but you can see the changes. See if this does it for you: class ImageFactory { public function MakeThumb($thumb_target = '', $width...

Feature thumbnails for specific custom post types

wordpress,thumbnails,custom-post-type

You need to define the support for feature images, so add the following line after each array for all the custom post types. 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'sticky') You can of course remove or add the features you need or don't. See all supports in the codex:...

is image_downsize supposed to work inside a custom walker?

wordpress,thumbnails,menuitem

Here is you solution: add_filter('walker_nav_menu_start_el', 'generate_nav_images', 20, 4); function generate_nav_images($item_output, $item, $depth, $args){ if( $args->theme_location == "topnav") { if(has_post_thumbnail($item->object_id)){ // get attachment ID $thumb_id = get_post_meta($item->object_id, '_thumbnail_id', true); $thumb_url = wp_get_attachment_image_src( $thumb_id, 'thumbnail', false ); $dom = new DOMDocument(); $dom->loadHTML($item_output); $dom->getElementsByTagName('a')->item(0)->setAttribute(...

How can I generate the thumbnail when displaying photos stored on the server drozone?

image,thumbnails,dropzone.js

I am recommending you create thumbnails on the server, because otherwise your users need to download all images in their original size, just to view small thumbnails. That being said, if you still want to go ahead, and download the originals and resize in the browser, I just released Dropzone...

jssor Gallery thumbnail image hover swap

javascript,jquery,html,css,thumbnails

You can define thumbnail using DIV, <div> <img u="image" src="../../Images/Gallery/Engagement/image/Tall/_IMG_004.jpg" /> <div u="thumb"> <img class="thumb1" src="../../Images/Gallery/Engagement/thumb_BnW/Tall/_IMG_004.jpg" /> <img class="thumb2" src="../../Images/Gallery/Engagement/thumb_CL/Tall/_IMG_004.jpg" /> </div> </div> And define your thumbnail navigator skin something like, <!-- Thumbnail Item Skin Begin --> <style> /* jssor slider thumbnail navigator skin 01 css */ /* .jssort01 .p...

Auto overwrite created thumbnail of video file in php

php,ffmpeg,thumbnails

$ffmpeg = "C:\\ffmpeg\\bin\\ffmpeg"; $videoFile = $_FILES["file"]["tmp_name"]; $imageFile = time().".jpg"; $size = "300x300"; $getFromSecond = 5; $cmd = "$ffmpeg -i $videoFile -an -ss $getFromSecond -s $size $imageFile"; if(!shell_exec($cmd)) { echo "Thumbnail Created!"; } else { echo "Error Creating Thumbnail"; } $imageFile = time().".jpg"; i have changed this line in your code,which...

How to change Android thumbnail to protect sensitive data

android,thumbnails

Is removing the app from recent apps completely an option? Then set android:excludeFromRecent to true for the activity.

unable in creating thumb IMAGE IS BLACK [duplicate]

php,image,thumbnails

use the following code <html> <body> <pre><? print_r($_FILES); //SHOW THE ARRAY foreach ($_FILES as $file) { if (!$file['error']) { //PROCESS THE FILE HERE echo $file['name']; } } ?></pre> <script src="http://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script> <script type="text/javascript"> var fd = new FormData(); $(document).ready(function() { //submit dragdropped by ajax $("#dropsubmit").on("click", function(e) { $.ajax({ data: fd,...

Image crops uncontrollably different for different products in Wordpress

css,wordpress,image,woocommerce,thumbnails

I believe you need to refresh the thumbnails since you changed them in the woocommerce settings. You can do this easily with this plugin. http://wordpress.org/plugins/regenerate-thumbnails/ As far as leaving them uncropped and changing the size, just do this in a image editor. Otherwise there are several ways to do it....

Best approach to create thumbnails?

php,thumbnails

Using Mr. Thumb like I advised a simple script to get it working would be <?php include './mrthumb.class.php'; // The image you are resizing. Can be a local path as well. $image = $_GET['i']; $quality = 100; // percent // In this example we are resizing the image in proportionate...

Android: Creating contact thumbnail from name initials

android,android-layout,android-imageview,thumbnails,bitmapimage

Well you're on the right track. Try it something like this. ImageView iv=(ImageView)findViewById(R.id.imageView1); Bitmap b=Bitmap.createBitmap(view.getWidth(), view.getHeight(), Bitmap.Config.ARGB_8888); Canvas c = new Canvas(b); c.drawText(initials,x,y,paint); iv.setImageBitmap(b); You should create your own logic to center the text. You could use some of the following helper method Paint.getTextSize() to find out how much space...

WordPress get post thumbnails in a custom pattern

php,html,wordpress,thumbnails,codex

Make a counter outside the function. Inside the function, increment the counter. But before that, check if it countr % 3 == 0. If so, show the big thumbnail. <?php $counter = 0; foreach ($posts as $post) { if($counter %3 == 0) { $big = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'thumbnail_600x200'...

wordpress displaying attachment on single cpt with thumbnail size

wordpress,thumbnails

You can use wp_get_attachment_thumb_url( $attachment_id ); as follow: <img src="<?php echo wp_get_attachment_thumb_url( $image->ID ); ?>" alt="<?php echo $image->post_title; ?>" title="<?php echo $image->post_title; ?>" /> ...

Wordpress. How to get post thumbnail without default class?

wordpress,class,post,thumbnails

$url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); <img src="<?php echo $url; ?>" longdesc="URL_2" alt="Text_2" /> you can use function get_post_thumbnail_id() to get same image...

How to check if image url has been loaded with jQuery?

javascript,jquery,slider,thumbnails,jquery-load

You can do it like this: $('.thumb').click(function () { topImageSrc = $(this).data("bigimage"); var topImage = $('<img>').attr('src', topImageSrc); $(topImage).load(function () { coverMain.attr('src', topImageSrc); main.fadeOut("slow"); }); }); This creates an image (without appending it anywhere), sets its source to the topImageSrc URL and checks for the load event....

Error when creating UIImage

ios,xcode,thumbnails

Try size instead of self.size in the below line: CGSize mainImageSize = self.size;//LINE WHERE IT CRASHES ...

Wordpress post thumbnail url is not working correctly

php,wordpress,thumbnails

get_field() returns Object (array of data), URL (string), or ID (int). It can be changed in field settings. var_dump() your return value to see what's inside. See docs for details....

How to make a responsive thumbnail and apply fallback image on WordPress?

php,wordpress,thumbnails,fallback

try this. untested <?php if( has_post_thumbnail( $post_id ) ) { ?> <img title="" alt="" src="<?=wp_get_attachment_url( get_post_thumbnail_id() ); ?>" style="width:100%; height:auto;"> <?php } else { //fallback img here } ?> ...

How to register Shell Thumbnail handlers

c++,shell,handler,thumbnails

I managed to register more than 1 custom files, but the way I did it leaves me baffled... So if anyone could take the time to explain it to me I d sure appreciate it. I copied the c++ project/solution to a new folder, changed the custom filetype parameters inside...

How to get thumbnails for scaling?

android,thumbnails

You can retrieve MINI_KIND thumbnails this way, MediaStore.Images.Thumbnails.getThumbnail(cr, id, MediaStore.Images.Thumbnails.MINI_KIND, null) "cr" is a ContentResolver type , that particular function returns a bitmap, but you can get URI's from the ContentResolver There are also MICRO_KIND thumbnails That should help direct your search...

thumbnails are not properly shown in light box gallery

jquery,twitter-bootstrap,thumbnails,lightbox

It seems your link to bootstrap, or the copy of bootstrap you are using is not valid. Perhaps the gallery is disabling or overriding its styles somehow. In either case it will work if you replace class="col-lg-2" // or the equivalent with style="width:33%; display:inline-block" // with the equivalent width EXAMPLE:...

How to get the video thumbnail path, and not the bitmap

android,thumbnails

First, you need to know the content uri of the file. If you have the file path, this shows you how to get the content uri. public static String[] thumbColumns = { MediaStore.Video.Thumbnails.DATA }; public static String[] mediaColumns = { MediaStore.Video.Media._ID }; public static String getThumbnailPathForLocalFile(Activity context, Uri fileUri) {...

How to make bottom element in Bootstrap thumbnails affixed to the bottom?

html,css,twitter-bootstrap,twitter-bootstrap-3,thumbnails

I just gave min and max height to <p> with overflow. See if this is suitable to you. p.middle-text { min-height: 130px; max-height: 130px; overflow: hidden; } https://www.xtendify.com/en/snippets/bootstrap/9-equal-column-height...

On woocommerce how do I remove this cropping to product catergory thumbnails?

wordpress,image,woocommerce,thumbnails

The category images are the same size as shop_image (or Catalog) thumbnail. WooCommerce handles its product thumbnails in its settings: WooCommerce->Settings>Products>Display You can change its height, width, and toggle the hard crop on/off. ...

Uploadify multi upload generating tumnails only uploads and overwrites one image

php,jquery,thumbnails,uploadify

The filename used to save the image is created in these line: $filename = "artist_" . $yourid . "." . $fileParts ['extension']; So every file you upload get's the same name. You could use the original filenames filenames: $filename = $fileParts['filename']. "." . $fileParts ['extension']; ...

How set in WordPress thumbnail php

php,wordpress,thumbnails

In your code $img is the array with arguments you use in wp_insert_post( $img );. You're currently using this as the second argument of set_post_thumbnail() which is not right. Instead use: $thumbnail_id = wp_insert_post( $img ); // $thumbnail_id now holds the ID of the inserted image set_post_thumbnail( $postik, $thumbnail_id );...

Get thumbnail images of websites?

c#,wpf,thumbnails,itemscontrol

Essentially you have been drawing nulls. The older style of bitmaps do not really travel that well into WPF. You can change this code... sep s = new sep(); s.title = item.title; s.thumbnail = (System.Drawing.Image)GetThumbImage(item.urlsite); to this... Sep sep = new Sep(); sep.Title = "title"; var bmp = GetThumbImage("xxx"); using...

DIsplaying a tumbnail image from an RSS feed into tableView cell

ios,objective-c,uitableview,rss,thumbnails

You can use an XML Parser, or you can treat it as NSString and extract the src attribute like this : NSString *imageURLstr=item.summary; imgURL = [imgURL substringToIndex:[imgURL rangeOfString:@"alt="].location-2]; imgURL = [imgURL substringFromIndex:[imgURL rangeOfString:@"src="].location+[@"src=" length]+1]; NSLog(@"src: %@",imgURL); ...

Proper alignment of thumbnails generated via php on bootstrap framework

php,twitter-bootstrap,alignment,thumbnails

A couple of issues and how to fix them: There is an extra " in this line: <?php if($shop[imagefile]!=''){?><img src="imagefiles/<?php echo $shop[imagefile];?>" class="img-responsive" "><?php } ?> after the class="img-responsive". If you don't remove it, it's going to make a mess of things for sure. If you have a column and...

bootstrap 3 thumbnail not repeating across the page

twitter-bootstrap-3,thumbnails

Its because you create a row and 1 column this means it will only create 1 colum. If you put the repeat in the column block it will create them alongside each other instead of underneath....

Removing Files with specific ending. Need something more specific

wordpress,bash,file,terminal,thumbnails

You can try this: find -type f | grep -P '\w+-\d+x\d+\.\w+$' | xargs rm If you have spaces in the path: find -type f | grep -P '\w+-\d+x\d+\.\w+$' | sed -re 's/(\s)/\\\1/g' | xargs rm Example: find -type f | grep -P '\w+-\d+x\d+\.\w+$' | sed -re 's/(\s)/\\\1/g' | xargs ls...

Codeigniter thumbnail array not working

php,thumbnails,image-uploading,manipulation

Replace $config1['source_image'] = $image['full_path']; To $config1['source_image'] = $data['full_path']; Also remove the following commented lines $this->image_lib->resize(); //$this->upload->do_upload(); //$data = $this->upload->data(); ...

How can PNG image transparency be preserved when using PHP code for Thumbnail Generation

php,thumbnails

I think your problem is in the line below: $thumbnail_gd_image = imagecreatetruecolor($real_width, $real_height); According to http://www.php.net/manual/en/function.imagecreatetruecolor.php imagecreatetruecolor() returns an image identifier representing a black image of the specified size. ...

Create square 1:1 thumbnail in PHP

php,image,thumbnails

This function did the trick function crop_img($imgSrc){ //getting the image dimensions list($width, $height) = getimagesize($imgSrc); //saving the image into memory (for manipulation with GD Library) $myImage = imagecreatefromjpeg($imgSrc); // calculating the part of the image to use for thumbnail if ($width > $height) { $y = 0; $x = ($width...

Thumbnails with Face Detection in PHP

php,thumbnails,crop,face-detection

Can you increase the time limit? You can use set_time_limit() or change your php.ini if you have access to it. Also, how big is the detection.dat file? Loading the entire file in memory with file_get_contents() can take some time if the file is large. Unless you mess up with the...

How do I get Photoswipe to recognize entire gallery from list of thumbnail images

jquery,html5,zurb-foundation,thumbnails,photoswipe

The easiest option is to switch the figure tags for li tags. <ul class="my-gallery small-block-grid-1 large-block-grid-3" itemscope itemtype="http://schema.org/ImageGallery"> <li itemscope itemtype="http://schema.org/ImageObject"> <a href="assets/images/image01.jpg" itemprop="contentUrl" data-size="2000x1125"> <img src="assets/images/image01.jpg" itemprop="thumbnail" alt="Image description" /> </a> <div class="caption" itemprop="caption description">Image caption 1</div> </li> <li...