Search Results

Search found 808 results on 33 pages for 'resizing'.

Page 10/33 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • PHP image resize on the fly vs storing resized images

    - by Pablo
    I'm building a image sharing site and would like to know the pros and cons of resizing images on the fly with php and having the resized images stored. Which is faster? Which is more reliable? how big is the gap between the two methods in speed and performance? Please note that either way the images go through a PHP script for statistics like views or if hotlinking is allow etc... so is not like it will be a direct link for images if i opt to store the resize images. I'll appreciated your comments or any helpful links on the subject, Thanks.

    Read the article

  • Fixing Chrome resizing behaviour

    - by bobo
    <div style="background-color:red;width: 300px;"> <div style="float:left;border:1px solid yellow;">AAA AAA AAA</div> <div style="float:left;border:1px solid green;">BBB BBB BBB</div> <div style="clear:both;"></div> </div> Pasting the above HTML here: http://htmledit.squarefree.com/ And then zoom out in Chrome, you will see that <div> B will eventually be forced down to the next row. If you do the same thing in Firefox and IE, both <div> A and B will stay on the same row. Adding a height attribute on the parent <div> may help, but if the height of the content is not known beforehand, this will not be feasible. I would like to know how this problem can be fixed in Chrome. Many thanks to you all. EDIT: uploaded a screenshot here: http://img52.imageshack.us/i/screenshot1xd.jpg/

    Read the article

  • PHP resizing PNGs results in corrupted files

    - by Robert
    I have a PHP script that resizes .jpg, .gif, and .png files to a bounding box. $max_width = 500; $max_height = 600; $filetype = $_FILES["file"]["type"]; $source_pic = "img/" . $idnum; if($filetype == "image/jpeg") { $src = imagecreatefromjpeg($source_pic); } else if($filetype == "image/png") { $src = imagecreatefrompng($source_pic); } else if($filetype == "image/gif") { $src = imagecreatefromgif($source_pic); } list($width,$height)=getimagesize($source_pic); $x_ratio = $max_width / $width; $y_ratio = $max_height / $height; if( ($width <= $max_width) && ($height <= $max_height) ) { $tn_width = $width; $tn_height = $height; } else if (($x_ratio * $height) < $max_height) { $tn_height = ceil($x_ratio * $height); $tn_width = $max_width; } else { $tn_width = ceil($y_ratio * $width); $tn_height = $max_height; } $tmp = imagecreatetruecolor($tn_width,$tn_height); imagecopyresampled($tmp,$src,0,0,0,0,$tn_width, $tn_height,$width,$height); $destination_pic = "img/thumbs/" . $idnum . "thumb"; if($filetype == "image/jpeg") { imagejpeg($tmp,$destination_pic,80); } else if($filetype == "image/png") { imagepng($tmp,$destination_pic,80); } else if($filetype == "image/gif") { imagegif($tmp,$destination_pic,80); } imagedestroy($src); imagedestroy($tmp); The script works fine with jpeg and gif but when running on a png the file will be corrupted. Is there anything special I need to use when working with a png? I have never worked with this sort of thing in PHP so I'm not very familiar with it.

    Read the article

  • Resizing the Camera Preview

    - by uday
    I have implemented a camera application, which will show the preview in the entire screen of the device. But my requirement is to show the Camera preview in a small screen. My device resolution is 800x480(WxH) i.e, Nexus one. I can able to show the preview in the entire screen without scale down the preview. Its coming perfectly, but when i try show the preview in small screens(part of my total mobile screen), the preview is getting stretched and not looking good. Is there any way to show the preview correctly in a small screen. I think we need to scale down the image preview. But when i try to scale down the image preview, the android system itself doesn't allowing to set the scaled preview size. Could any one please help me how to scale the image preview in small screen.

    Read the article

  • Dynamically resizing CFWINDOW to fit content

    - by Ryan French
    Hi all, Am currently working on a site that uses a lot of cfwindow objects and I was wondering if anyone knows of a way to dynamically resize the window so that all the content fits in without the need for scroll bars. I have tried using the overflow=visible configuration but it doesnt seem to make a difference. Thanks in advance for any advice.

    Read the article

  • Resizing Grid Views On Window Resize

    - by Jack Mills
    I'm making a small Windows Forms application that contains a lot of grid views. I want all the grid views to resize with the window. I could make a function that detects window resize and then changes the size of each grid view but that feels a bit clunky. Is there not an easier/more intelligent way to do this

    Read the article

  • Resizing the imageView in a UITableView

    - by Luca
    Hi! I Created a grouped table view, and I noticed that placing an image in the imageView results in an image that is too large. It overlaps the rounded borders of the cell, which is horrible. I tried looking for a way to resize it, but I found many answers that didn't quite satisfy me. How would you do this? Which is the simplest way to go? The solutions I found where strangely complicated. Thanks!

    Read the article

  • Resizing to page width for print style sheet

    - by rampion
    So I've got a page that shows an image with some absolutely positioned text on top of it. I want to write a print style sheet for it so that: the image is resized to fit the width of the page the text is repositioned and resized to maintain relative position and size with the image behind it So I know I can do (1) with just max-width: 100%, but I'm not sure how to accomplish (2). I'm okay with using some javascript if necessary, but I wanted to know if there's a way to do this in pure CSS. If I do need to use javascript, what can I hook to check for the pixel width of the image in the printed page? Just use the calculated width as normal? And yes, this question might be more appropriate for DocType, but I've yet to get any help over there.

    Read the article

  • Image resizing efficiency in C# and .NET 3.5

    - by Matthew Nichols
    I have written a web service to resize user uploaded images and all works correctly from a functional point of view, but it causes CPU usage to spike every time it is used. It is running on Windows Server 2008 64 bit. I have tried compiling to 32 and 64 bit and get about the same results. The heart of the service is this function: private Image CreateReducedImage(Image imgOrig, Size NewSize) { var newBM = new Bitmap(NewSize.Width, NewSize.Height); using (var newGrapics = Graphics.FromImage(newBM)) { newGrapics.CompositingQuality = CompositingQuality.HighSpeed; newGrapics.SmoothingMode = SmoothingMode.HighSpeed; newGrapics.InterpolationMode = InterpolationMode.HighQualityBicubic; newGrapics.DrawImage(imgOrig, new Rectangle(0, 0, NewSize.Width, NewSize.Height)); } return newBM; } I put a profiler on the service and it seemed to indicate the vast majority of the time is spent in the GDI+ library itself and there is not much to be gained in my code. Questions: Am I doing something glaringly inefficient in my code here? It seems to conform to the example I have seen. Are there gains to be had in using libraries other than GDI+? The benchmarks I have seen seem to indicate that GDI+ does well compare to other libraries but I didn't find enough of these to be confident. Are there gains to be had by using "unsafe code" blocks? Please let me know if I have not included enough of the code...I am happy to put as much up as requested but don't want to be obnoxious in the post.

    Read the article

  • auto resize text (font size) when resizing window?

    - by Stephen
    Hi, I have been trying(in vain) to build a page whose elements would resize as I changed the window size. I have it working in css for images no problem, but I can't seem to accomplish the same for text, and I am not sure it is even possible in CSS. And I can't seem to find a jquery script that accomplishes this. When a user resizes the window, I essentially want the page to scale dynamically and fluidly, without the user having to invoke page zoom. This works fine on my img divs via css, but not for the text, which stays the same size. any ideas? Thanks!

    Read the article

  • Why is my view not resizing after rotating?

    - by E-Madd
    I'm only supporting the portrait orientation, but both the right-side-up and upside-down versions. Why do my subviews not resize appropriately? There's a status bar sized black space at the top of the view. If I change tabs and come back, it's corrected.

    Read the article

  • I need help to disable shadowbox from resizing

    - by Adam
    This overlay seems to be the only overlay plugin that works within my schools wonky template... but the problem is that when the browser is resized the shadowbox resizes too, clipping the contents inside. I want it so the box stats fixed and if the browser does get smaller the browser will have scrollbars. I know it's been modified before, but i dont know where to start. I cant even find an unminified version of the .js file. Thanks

    Read the article

  • Monotouch auto resizing views in iphone

    - by Tim Bassett
    I have created a view in interface builder that contains another view (content area) and a button bar at the bottom. The hierarchy is as: ->View --->mapContainer UIView ----->map MKMapView ----->OverlayView UIView --->ToolBar UIToolBar I would like the mapContainer to resize to full window when the ToolBar is hidden. I would like the map and the OverlayView to resize to the mapContainer size I have attempted the following code, but it has no effect. Please advise? public override void ViewDidLoad () { base.ViewDidLoad (); this.mapContainer.AutosizesSubviews = true ; this.View.AutosizesSubviews = true ; try { this.mapContainer.AutoresizingMask = UIViewAutoresizing.FlexibleHeight | UIViewAutoresizing.FlexibleWidth ; this.map.AutoresizingMask = UIViewAutoresizing.FlexibleHeight | UIViewAutoresizing.FlexibleWidth ; this.map.SizeToFit(); this.mapContainer.SizeToFit(); this.map.SizeToFit(); this.View.Frame = new System.Drawing.RectangleF(0,0,this.View.Frame.Width, this.View.Frame.Height ); this.mapContainer.LayoutSubviews(); } catch(Exception ex) { Console.Write(ex.ToString()); } }

    Read the article

  • problem with animating resizing agdatagridcolumn !!

    - by mahdokht
    i want resize width of agdatagridcolumn in a agdatagrid with animation code : (CreateStb(agdatagrid)).Begin();//Exceptin: Cannot resolve TargetProperty Width on specified object. . . Private StoaryBoard CreateStb(UIElement element) { Storyboard stb = new Storyboard(); DoubleAnimation dbAnmtin = new DoubleAnimation(); Storyboard.SetTarget(dbAnmtin, (AgDataGridColumn)((AgDataGrid)element).Columns[0]); Storyboard.SetTargetProperty(dbAnmtin, new PropertyPath("Width")); dbAnmtin1.To=//custom value dbAnmtin1.Duration=//custom value stb.Children.Add(dbAnmtin); Return stb; } I think defining TargetProperty has a problem but I don’t know how to solve it . plz help me

    Read the article

  • Help with getting data from resized image.

    - by nick
    I'm using an ASP.NET file upload control and then resizing an image and storing the new image in a new Bitmap. Here is the code I have so far: protected void ResizeImage() { Bitmap originalBMP = new Bitmap(FileUpload1.FileContent); //Calculate new image dimensions int origWidth = originalBMP.Width; int origHeight = originalBMP.Height; int sngRatio = origWidth / origHeight; int newWidth = 100; int newHeight = newWidth / sngRatio; Bitmap newBMP = new Bitmap(originalBMP, newWidth, newHeight); } I'm uploading directly to Amazon S3 and I need to pass some data to its upload method. How do I get the following information from my new bitmap that I have been using with the fileupload?: FileUpload1.FileBytes FileUpload1.FileBytes.Length Do I need to save my new bitmap to a stream so I can get an array of bytes?

    Read the article

  • How to resize table via javascript in IE?

    - by MartyIX
    I've got this table: <table id="correctness" style="overflow: hidden;"> <tr><td style="overflow: hidden;"> <div id="correctness-message"></div> <span class="hide"> <button type="button" class="hide" onclick="new DisplayEffect('correctness').Hide(500);">Hide</button> </span> </td> </tr> </table> and a function for resizing the table: function resize(element, size) { element.style.height = size + "px";}; which is called for a certain amount of time (e.g. 1 second) with the ID of table (i.e. "correctness") in order to resize the table from zero height to its full height. This code works in Firefox and Chrome but it doesn't work in IE8. What it does is that it displays right away whole table even thought the height set in "resize" method is much lower. It seems that the cell sets the height of parent table and not the other way around. Is it possible to change the behaviour? I like changing the height of the table better because I can set visibility of the table easily. Thanks for any help!

    Read the article

  • imageconvolution leaves black dot in the upper left corner

    - by Peter O.
    I'm trying to sharp resized images using this code: imageconvolution($imageResource, array( array( -1, -1, -1 ), array( -1, 16, -1 ), array( -1, -1, -1 ), ), 8, 0); When the transparent PNG image is sharpened, using code above, it appears with a black dot in the upper left corner (I have tried different convolution kernels, but the result is the same). After resizing the image looked OK. 1st image is the original one 2nd image is the sharpened one EDIT: What am I going wrong? I'm using the color retrieved from pixel. $color = imagecolorat($imageResource, 0, 0); imageconvolution($imageResource, array( array( -1, -1, -1 ), array( -1, 16, -1 ), array( -1, -1, -1 ), ), 8, 0); imagesetpixel($imageResource, 0, 0, $color); Is imagecolorat the right function? Or is the position correct? EDIT2: I have changed coordinates, but still no luck. I've check the transparency given by imagecolorat (according to this post). This is the dump: array(4) { red => 0 green => 0 blue => 0 alpha => 127 } Alpha 127 = 100% transparent. Those zeroes might cause the problem...

    Read the article

  • CSS positioning is weird when reducing the viewport

    - by Lars Hanke
    I have a little meditation for you ... I run a site using a liquid tri-col layout with a header. The layout runs nicely since more than a decade with all browsers I ever dared to try. It is based on absolute positioning in CSS. This page provides an example of the actual site. Watching the page from my tablet I found that the right column overlaps the center matter. Further investigation using Firebug showed that once the center content reaches 360px width, the right margin of the div shrinks. Why is that? Since Firefox and Android render the same, I guess that this is something, which is actually supposed to be. However, I tried to make virtue out of necessity and experimented setting min-width for body and content and made the body scroll overflow. The body actually scrolls, but the right column is positioned on the right edge of the viewport instead of the body element (Firefox). Is this intentional CSS standard? Any ideas how to solve the presentation on small displays? Thanks for your efforts,  – lars.

    Read the article

  • Tim Thumb for an External Host / CDN

    - by Wes
    I'm running a stock copy of tim thumb on a clients website. Works great but does not support external hosts for the pictures. My clients uses an amazon CDN / Flickr for all of their websites pictures which doesnt allow me to resize on the fly. Has anyone found a work around for this? http://code.google.com/p/timthumb/

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >