Search Results

Search found 28227 results on 1130 pages for 'smaller live image'.

Page 15/1130 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • vmdk to live cd - VMware vmxnet virtual NIC driver Kernel panic

    - by ronalchn
    Task I am trying to convert a virtual machine to a live CD. Specifically, the virtual machine I am trying to convert is the IOI 2013 Competition Environment. In this task, I am aided by a guide Converting a virtual disk image: VDI or VMDK to an ISO you can distribute. Symptoms However, after getting through all the instructions, the live CD causes a kernel panic on boot on bare metal. In particular, the screen shows: [0.737348] cdrom: Uniform CD-ROM driver Revision: 3.20 [0.737503] sr 3:0:0:0: >Attached scsi CD-ROM sr0 [0.737638] sr 3:0:0:0: >Attached scsi generic sg2 type 5 [0.737771] Freeing unused kernel memory: 756k freed [0.738093] Write protecting the kernel text: 5960k [0.738155] Write protecting the kernel read-only data: 2424k [0.738224] NX-protecting the kernel data: 4280k Loading, please wait... [0.752252] udevd[100]: starting version 175 [0.768708] VMware vmxnet3 virtual NIC driver - version 1.1.29.0-k-NAPI [0.781204] VMware PVSCSI driver - version 1.0.2.0-k [0.789555] VMware vmxnet virtual NIC driver [0.799356] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000200 [0.799356] [0.799472] Pid: 1, comm: init Tainted: G 0 3.5.0-17-generic #28-Ubuntu [0.799549] Call Trace: [0.799603] [<c15bf0ec>] panic+0x81/0x17b [0.799654] [<c104a6a5>] do_exit+0x745/0x7a0 [0.799707] [<c104a9a4>] do_group_exit+0x34/0xa0 [0.799760] [<c104aa28>] sys_exit_group+0x18/0x20 [0.799813] [<c15cff5f>] sysenter_do_call+0x12/0x28 Possible problem I suspect that the problem is the VMware vmxnet virtual NIC driver - however, I do not know how I can uninstall it, and possibly install one for a bare metal machine. If anyone knows which packages needs installing/uninstalling at the .rootfs/ chroot directory stage, please let me know. Details on procedure Do note that after importing the .ova file into Virtualbox, the virtual machine is stored as a .vmdk file already, and not a .vdi file. I would like to point out some results of the procedure followed in case of any questions. This is after extracting the filesystem from the .raw file to the .rootfs/ directory mentioned in the blog. I changed the filesystem table as mentioned in the blog, then looked at the possible "kernel optimized for virtualization". However, I found that linux-image-generic was already installed. Also, when running the command dpkg-query --showformat='${Package}\n' -W 'vmware-tools*' (or dpkg-query --showformat='${Package}\n' -W '*-virtual'), no packages were found. Thus, I did not find any virtualization specific packages. I proceeded to generate the iso following the steps in the blog, and burned it to a DVD.

    Read the article

  • Live CD works OK. Is it OK to assume a new install will work?

    - by ign
    I've got a Toshiba a505 laptop and tried the live CD with great results. However, I haven't found any reports on this PC working 100% OK on Ubuntu 10.10 yet. I do have seen (and tried installing myself) some reports that 10.04 didn't work (without some dirty hacking). In regular circumstances, is it OK to assume that a new install will work if the live CD works? Are there any tools I can run to check compatibility? Thanks!

    Read the article

  • Image over a Image

    - by rupesh
    Hi i want to put a Big image over a small Image , condition is the image which is on top has some specific rectangular area where the second image will be displayed. I want the the small Image to be displayed inside the big image not over the big image. i don't no will it possible or not , if it is possible can any one provide me guidance or provide me a sample code or link thanks alot

    Read the article

  • Jquery image blur effect with in a div?

    - by bala3569
    Consider i have three images and one bannerDiv.... On initial page load i should show the first image and after sometimeout say 300ms i must show the second image and vise versa.... I have to blur the first image and show second image .... Any suggestion how it can be done with jquery... <div Id="BannerDiv" style="display:none;"> <img src="mylocation" alt="image1"/> <img src="mylocation" alt="image2"/> <img src="mylocation" alt="image3"/> </div> and my jquery function is, <script type="text/javascript"> $(document).ready(function() { //how to show first image and blur it to show second image after 300 ms }); </script> EDIT: 1st image to fade out after 300ms and show 2nd image 2nd image to fade out after 300ms and show 3rd image 3rd image to fade out after 300ms and show 1st image....

    Read the article

  • Png image processing in .NET.

    - by Oybek
    I have the following task. Take a base image and overlay on it another one. The base image is 8b png as well as overlay. Here are the base (left) and overlay (right) images. Here is a result and how it must look. The picture in the left is a screenshot when one picture is on top of another (html and positioning) and the second is the result of programmatic merging. As you can see in the screenshot the borders of the text is darker. Also here are the sizes of the images Base image 14.9 KB Overlay image 6.87 KB Result image 34.8 KB The size of the resulting image is also huge Here is my code that I use to merge those pictures /*...*/ public Stream Concatinate(Stream baseStream, params Stream[] overlayStreams) { var @base = Image.FromStream(baseStream); var canvas = new Bitmap(@base.Width, @base.Height); using (var g = canvas.ToGraphics()) { g.DrawImage(@base, 0, 0); foreach (var item in overlayStreams) { using (var overlayImage = Image.FromStream(item)) { try { Overlay(@base, overlayImage, g); } catch { } } } } var ms = new MemoryStream(); canvas.Save(ms, ImageFormat.Png); canvas.Dispose(); @base.Dispose(); return ms; } /*...*/ /*Tograpics extension*/ public static Graphics ToGraphics(this Image image, CompositingQuality compositingQuality = CompositingQuality.HighQuality, SmoothingMode smoothingMode = SmoothingMode.HighQuality, InterpolationMode interpolationMode = InterpolationMode.HighQualityBicubic) { var g = Graphics.FromImage(image); g.CompositingQuality = compositingQuality; g.SmoothingMode = smoothingMode; g.InterpolationMode = interpolationMode; return g; } My questions are What should I do in order to merge images to achieve the result as in the screenshot? How can I lower the size of the result image? Is the System.Drawing a suitable tool for this or is there any better tool for working with png for .NET?

    Read the article

  • Indexing community images for google image search

    - by Vittorio Vittori
    Hi, I'm trying to understand how can I do to let my site be reachable from google image search spiders. I like how last.fm solution, and I thought to use a technique like his staff do to let google find artists images on their pages. When I'm looking for an artist and I search it on google image search, as often as not I find an image from last.fm artists page, I make an example: If I search the band Pure Reason Revolution It brings me here, the artist's image page http://www.last.fm/music/Pure+Reason+Revolution/+images/4284073 Now if I take a look to the image file, i can see it's named: http://userserve-ak.last.fm/serve/500/4284073/Pure+Reason+Revolution+4.jpg so if I try to undertand how the service works I can try to say: http://userserve-ak.last.fm/serve/ the server who serve the images 500/ the selected size for the image 4284073/ the image id for database Pure+Reason+Revolution+4.jpg the image name I thought it's difficult to think the real filename for the image is Pure+Reason+Revolution+4.jpg for image overwrite problems when an user upload it, in fact if I digit: http://userserve-ak.last.fm/serve/500/4284073.jpg I probably find the real image location and filename With this tecnique the image is highly reachable from search engines and easily archived. My question is, does exist some guide or tutorial to approach on this kind of tecniques, or something similar?

    Read the article

  • Prepare community images for google image search indexing

    - by Vittorio Vittori
    Hi, I'm trying to understand how can I do to let my site be reachable from google image search spiders. I like how last.fm solution, and I thought to use a technique like his staff do to let google find artists images on their pages. When I'm looking for an artist and I search it on google image search, as often as not I find an image from last.fm artists page, I make an example: If I search the band Pure Reason Revolution It brings me here, the artist's image page http://www.last.fm/music/Pure+Reason+Revolution/+images/4284073 Now if I take a look to the image file, i can see it's named: http://userserve-ak.last.fm/serve/500/4284073/Pure+Reason+Revolution+4.jpg so if I try to undertand how the service works I can try to say: http://userserve-ak.last.fm/serve/ the server who serve the images 500/ the selected size for the image 4284073/ the image id for database Pure+Reason+Revolution+4.jpg the image name I thought it's difficult to think the real filename for the image is Pure+Reason+Revolution+4.jpg for image overwrite problems when an user upload it, in fact if I digit: http://userserve-ak.last.fm/serve/500/4284073.jpg I probably find the real image location and filename With this tecnique the image is highly reachable from search engines and easily archived. My question is, does exist some guide or tutorial to approach on this kind of tecniques, or something similar?

    Read the article

  • Prepare your site images for google image search indexing

    - by Vittorio Vittori
    Hi, I'm trying to understand how can I do to let my site be reachable from google image search spiders. I like how last.fm solution, and I thought to use a technique like his staff do to let google find artists images on their pages. When I'm looking for an artist and I search it on google image search, as often as not I find an image from last.fm artists page, I make an example: If I search the band Pure Reason Revolution It brings me here, the artist's image page http://www.last.fm/music/Pure+Reason+Revolution/+images/4284073 Now if I take a look to the image file, i can see it's named: http://userserve-ak.last.fm/serve/500/4284073/Pure+Reason+Revolution+4.jpg so if I try to undertand how the service works I can try to say: http://userserve-ak.last.fm/serve/ the server who serve the images 500/ the selected size for the image 4284073/ the image id for database Pure+Reason+Revolution+4.jpg the image name I thought it's difficult to think the real filename for the image is Pure+Reason+Revolution+4.jpg for image overwrite problems when an user upload it, in fact if I digit: http://userserve-ak.last.fm/serve/500/4284073.jpg I probably find the real image location and filename With this tecnique the image is highly reachable from search engines and easily archived. My question is, does exist some guide or tutorial to approach on this kind of tecniques, or something similar?

    Read the article

  • image transistion

    - by Jeff Main
    Hi all. I've gotten stuck again. I've got an image (album cover) that I'll be changing in code behind, and wish to basicaly do the following. When a new album cover image is determine and aquired, I want the current image in the image control to fade out, get updated with the new cover, and then fade back in. I'm not seeing very many good examples on how to accomplish this in code behind. The following was my latest failed attempt... if (currentTrack != previousTrack) { BitmapImage image = new BitmapImage(); image.BeginInit(); image.CacheOption = BitmapCacheOption.OnLoad; image.CreateOptions = BitmapCreateOptions.IgnoreImageCache; image.UriSource = new Uri(Address, UriKind.Absolute); image.EndInit(); Storyboard MyStoryboard = new Storyboard(); DoubleAnimation FadeOut = new DoubleAnimation(); FadeOut.From = 1.0; FadeOut.To = 0.0; FadeOut.Duration = new Duration(TimeSpan.FromSeconds(.5)); MyStoryboard.Children.Add(FadeOut); Storyboard.SetTargetName(FadeOut, CoverArt.Name); Storyboard.SetTargetProperty(FadeOut, new PropertyPath(Rectangle.OpacityProperty)); CoverArt.Source = image; DoubleAnimation Fadein = new DoubleAnimation(); Fadein.From = 0.0; Fadein.To = 1.0; Fadein.Duration = new Duration(TimeSpan.FromSeconds(.5)); MyStoryboard.Children.Add(Fadein); Storyboard.SetTargetName(Fadein, CoverArt.Name); Storyboard.SetTargetProperty(Fadein, new PropertyPath(Rectangle.OpacityProperty)); MyStoryboard.Begin(this); } I'd prefer to do this in code behind simply because that is where I'm aquiring the image. Otherwise, I'm not sure how I'd trigger it. An example would be greatly appriciated. Thanks.

    Read the article

  • How can I broadcast video live (preferably wirelessly)?

    - by Blixt
    Update I've gotten plenty of feedback on the software solutions and the unanimous solution for having a handheld device to record video seems to be to use a mobile phone (I was hoping there'd be some webcam-like device with wifi support...) I'd appreciate more hardware suggestions now. That is, what mobile phones have good video recording quality (and battery time)? I'm looking for a solution to broadcast video live on the internet from a location (an apartment), with a device that can be carried around. What options are there? I'm looking for complete solutions (i.e., what hardware to use, what software to use, how it should all be set up.) Currently, I have my mobile phone (Nokia N95 8GB) with Qik installed connected to wifi, but unfortunately the videos get bad quality (especially since it's indoors with poor lighting) plus the battery gets used up quickly.

    Read the article

  • Windows Live Mail treating my Firefox as mobile device

    - by Mussnoon
    I started using Namoroka (firefox 3.6 nighly) yesterday and since then, windows live mail has been treating it like a mobile device. Same thing happens when I try with Minefield (firefox 4 nightly). I've tried loading the default page in Chromium and then pasting the URL to firefox. The sign in page shows alright then, but as soon as I sign in, the mobile inbox shows up again. I've tried clearing the cache+history+cookies everything but nothing's working. Anyone know of a solution?

    Read the article

  • Unable to open attachment in Windows Live Mail 2011 (Build 15.4.3502.0922)

    - by Anon2010
    I use Windows Live Mail 2011 (Build 15.4.3502.0922), in Windows 7 Pro 64. When I receive an email message that has an attachment, when I double click to open this attachment, nothing happens. Any kind of attachment, nothing happens. If I right click and choose "Open", nothing happens either. If I right click and choose Save As, I can save the file to disk and open it via Windows Explorer. I would like to be able to double click to open the attachment. I tried to repair WLM but that didn't make any difference. My antivirus is Microsoft Security Essentials. Does anyone know anything about this issue? Thanks

    Read the article

  • how to lower CPU usage for Ableton Live 8 in Mac OSX 10.6.8

    - by Travis Dtfsu Crum
    While running Ableton Live 8 after a project gets to a certain size, the audio starts to get a bit choppy and distorted. My levels are fine and is not the cause of the lag and chop. I have samples set to 1024 and the high quality button selected which I need to hear the sound. I always lower these when I'm recording audio with my mic but I need to have these turned up to be able to mix master the song. Anything I can do to lower the CPU usage? It sucks because I can't even use my iZotope Ozone plug-ins because of their CPU usage and they are AMAZING plug-ins that I would love to use.

    Read the article

  • My saved drafts become unread email in Windows Live Mail and Gmail IMAP

    - by Valamas
    I have setup windows live mail with my gmail account in IMAP mode. When I draft an email and save it. It saves in the drafts automatically. Within a minute, my WLM sound alerts new mail and shows mail icon in the system tray. However, this is for the draft I have saved which appears unread. To make the mail notification icon go away in the system tray, I go off and mark the draft as read. This repetition is tedious and distracting. How can I avoid this annoyance? thanks

    Read the article

  • Windows Live Writer code snippets plugins

    - by pcampbell
    Which Windows Live Writer code snippets formatting plugin do you recommend? Which plugin gives the best experience, or do you have any thoughts on: in the editor window produces readable output for the reader? are the results customizable (colors, fonts) ? CSS based, or static <font> tags? One plugin per answer, please. If you have experiences, notes, gotchas or fixes, please leave any details you can! Comments and edits are welcome!

    Read the article

  • CentOS Live CD Creation issues

    - by Dheeraj
    I am creating my customized CentOS 6.3 Live CD. I am following information given at https://projects.centos.org/trac/livecd/wiki/GetToolset My "livecd-creator" command completes successfully and an ISO image is created. But when I try to boot up my system with this ISO, it goes up to the CentOS blue screen and then the CAPS lock and Scroll Lock LEDs on the keyboard starts flashing. Then from here after, the system takes no input from keyboard and I have to power cycle it and it does the same thing. Could you get me any suggestion why this is causing and possible workaround. Thanks.

    Read the article

  • Fonts and encoding in windows live mail.

    - by Looser
    Sometimes I have non-english emails (arabic for example). When I try to open them with windows live mail, it doesn't show them correctly.. for example such this: &1588;&1603;&1585;&1575; &1610;&1575;&1605;&1575;&1606; (I changed it a bit to show here as I want) I had a look at options, there was encoding on arabic(windows) but I didn't find anything else. When I open this mail on yahoo however, there is no problem. What can I do?

    Read the article

  • Is there Linux Live USB that works with Snow Leopard macbook pro from 2010 april

    - by rofrol
    Hello, I was searching for a long time a Linux Live USB that I can boot my macbook pro from. Is there such distro so I can install it on Snow Leopard or Windows 7? UPDATE I've found this: "isohybrid" CD images (..) are special in that as well as the normal CD-based ISO9660 filesystem they also contain a valid-looking DOS-style partition table. Thus, if you simply copy one of these images raw to a USB stick a normal PC BIOS will boot the image directly. (...) Finally: I'd like to add support into xorriso for creating the nasty HFS hybrid images that are needed for booting Macs. The code that does this in cdrkit is probably some of the worst that I've ever worked with, and I'd like to get away from it. If only Apple hadn't stupidly built their proprietary platform around this shit and had used open standards instead Source

    Read the article

  • Hard-drive will randomly fail to load GRUB. Booting a live USB/CD fixes the issue temporarily

    - by Usagi
    I am running 12.04 64-bit and am dual booting with Win7, for full disclosure, although I suspect that has nothing to do with my problem. Occasionally the boot-loader(GRUB) will fail to load and I will be presented with a black screen with a single blinking line. There is no apparent pattern although I suspect there is one and it is related to a program I am running. This has happened to me eight out of ten power cycles now and I can fix it consistently, however, I have no idea why it happens. My current fix is to boot a live CD (I've tried both KNOPPIX and Ubuntu with the same result) and that's it. Somehow booting with the live CD is enough to "wake-up" my hard drive. I then reboot and GRUB magically appears again. So what is going on? Is it possible that a program is corrupting my MBR and the live CD is restoring it? How can I narrow down the possibilities? Thanks. Additional: This is still a problem. I'm convinced now that it is not hardware related as I've spent the last month and several boot cycles on Windows without a hiccup. Recently when I started using Ubuntu again the problem started again. I am more interested in figuring out what is going on rather than actually fixing the problem. Are there any tools, logs, etc. I can use to unravel this mystery?

    Read the article

  • Load thumbnail image into PictureBox from directory

    - by zaidwaqi
    Hi, I use the following code to get thumbnail of image in Resources, and display on Picturebox. Image tmp = (System.Drawing.Image)myManager.GetObject(tempImage); cfgPassPicture[m].Image = tmp.GetThumbnailImage(40, 40, new System.Drawing.Image.GetThumbnailImageAbort(ThumbnailCallback), System.IntPtr.Zero); How do I do this for images in directory (instead of resources), given only the URL? I can load image into PictureBox via ImageLocation property, but not sure how to use Image property of PictureBox for this. Thanks

    Read the article

  • Java: Detecting image format, resize (scale) and save as JPEG

    - by BoDiE2003
    This is the code I have, it actually works, not perfectly but it does, the problem is that the resized thumbnails are not pasting on the white Drawn rectangle, breaking the images aspect ratio, here is the code, could someone suggest me a fix for it, please? Thank you import java.awt.Color; import java.awt.Graphics2D; import java.awt.Image; import java.awt.RenderingHints; import java.awt.geom.Rectangle2D; import java.awt.image.BufferedImage; import java.io.BufferedInputStream; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import javax.imageio.ImageIO; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; public class ImageScalerImageIoImpl implements ImageScaler { private static final String OUTPUT_FORMAT_ID = "jpeg"; // Re-scaling image public byte[] scaleImage(byte[] originalImage, int targetWidth, int targetHeight) { try { InputStream imageStream = new BufferedInputStream( new ByteArrayInputStream(originalImage)); Image image = (Image) ImageIO.read(imageStream); int thumbWidth = targetWidth; int thumbHeight = targetHeight; // Make sure the aspect ratio is maintained, so the image is not skewed double thumbRatio = (double)thumbWidth / (double)thumbHeight; int imageWidth = image.getWidth(null); int imageHeight = image.getHeight(null); double imageRatio = (double)imageWidth / (double)imageHeight; if (thumbRatio < imageRatio) { thumbHeight = (int)(thumbWidth / imageRatio); } else { thumbWidth = (int)(thumbHeight * imageRatio); } // Draw the scaled image BufferedImage thumbImage = new BufferedImage(thumbWidth, thumbHeight, BufferedImage.TYPE_INT_RGB); System.out.println("Thumb width Buffered: " + thumbWidth + " || Thumb height Buffered: " + thumbHeight); Graphics2D graphics2D = thumbImage.createGraphics(); // Use of BILNEAR filtering to enable smooth scaling graphics2D.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR); // graphics2D.drawImage(image, 0, 0, thumbWidth, thumbHeight, null); // White Background graphics2D.setPaint(Color.WHITE); graphics2D.fill(new Rectangle2D.Double(0, 0, targetWidth, targetHeight)); graphics2D.fillRect(0, 0, targetWidth, targetHeight); System.out.println("Target width: " + targetWidth + " || Target height: " + targetHeight); // insert the resized thumbnail between X and Y of the image graphics2D.drawImage(image, 0, 0, thumbWidth, thumbHeight, null); System.out.println("Thumb width: " + thumbWidth + " || Thumb height: " + thumbHeight); // Write the scaled image to the outputstream ByteArrayOutputStream out = new ByteArrayOutputStream(); ImageIO.write(thumbImage, OUTPUT_FORMAT_ID, out); return out.toByteArray(); } catch (IOException ioe) { throw new ImageResizingException(ioe); } } }

    Read the article

  • Java: Detecting image formate - resize (scale) and save as JPEG

    - by BoDiE2003
    This is the code I have, it actually works, not perfectly but it does, the problem is that the resized thumbnails are not pasting on the white Drawn rectangle, breaking the images aspect ratio, here is the code, could someone suggest me a fix for it, please? Thank you import java.awt.Color; import java.awt.Graphics2D; import java.awt.Image; import java.awt.RenderingHints; import java.awt.geom.Rectangle2D; import java.awt.image.BufferedImage; import java.io.BufferedInputStream; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import javax.imageio.ImageIO; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; public class ImageScalerImageIoImpl implements ImageScaler { private static final String OUTPUT_FORMAT_ID = "jpeg"; // Re-scaling image public byte[] scaleImage(byte[] originalImage, int targetWidth, int targetHeight) { try { InputStream imageStream = new BufferedInputStream( new ByteArrayInputStream(originalImage)); Image image = (Image) ImageIO.read(imageStream); int thumbWidth = targetWidth; int thumbHeight = targetHeight; // Make sure the aspect ratio is maintained, so the image is not skewed double thumbRatio = (double)thumbWidth / (double)thumbHeight; int imageWidth = image.getWidth(null); int imageHeight = image.getHeight(null); double imageRatio = (double)imageWidth / (double)imageHeight; if (thumbRatio < imageRatio) { thumbHeight = (int)(thumbWidth / imageRatio); } else { thumbWidth = (int)(thumbHeight * imageRatio); } // Draw the scaled image BufferedImage thumbImage = new BufferedImage(thumbWidth, thumbHeight, BufferedImage.TYPE_INT_RGB); System.out.println("Thumb width Buffered: " + thumbWidth + " || Thumb height Buffered: " + thumbHeight); Graphics2D graphics2D = thumbImage.createGraphics(); // Use of BILNEAR filtering to enable smooth scaling graphics2D.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR); // graphics2D.drawImage(image, 0, 0, thumbWidth, thumbHeight, null); // White Background graphics2D.setPaint(Color.WHITE); graphics2D.fill(new Rectangle2D.Double(0, 0, targetWidth, targetHeight)); graphics2D.fillRect(0, 0, targetWidth, targetHeight); System.out.println("Target width: " + targetWidth + " || Target height: " + targetHeight); // insert the resized thumbnail between X and Y of the image graphics2D.drawImage(image, 0, 0, thumbWidth, thumbHeight, null); System.out.println("Thumb width: " + thumbWidth + " || Thumb height: " + thumbHeight); // Write the scaled image to the outputstream ByteArrayOutputStream out = new ByteArrayOutputStream(); ImageIO.write(thumbImage, OUTPUT_FORMAT_ID, out); return out.toByteArray(); } catch (IOException ioe) { throw new ImageResizingException(ioe); } } }

    Read the article

  • Resize image on upload php

    - by blasteralfred
    Hi, I have a php script for image upload as below <?php $LibID = $_POST[name]; define ("MAX_SIZE","10000"); function getExtension($str) { $i = strrpos($str,"."); if (!$i) { return ""; } $l = strlen($str) - $i; $ext = substr($str,$i+1,$l); return $ext; } $errors=0; $image=$_FILES['image']['name']; if ($image) { $filename = stripslashes($_FILES['image']['name']); $extension = getExtension($filename); $extension = strtolower($extension); if (($extension != "jpg") && ($extension != "jpeg")) { echo '<h1>Unknown extension!</h1>'; $errors=1; exit(); } else { $size=filesize($_FILES['image']['tmp_name']); if ($size > MAX_SIZE*1024) { echo '<h1>You have exceeded the size limit!</h1>'; $errors=1; exit(); } $image_name=$LibID.'.'.$extension; $newname="uimages/".$image_name; $copied = copy($_FILES['image']['tmp_name'], $newname); if (!$copied) { echo '<h1>image upload unsuccessfull!</h1>'; $errors=1; exit(); }}} ?> which uploads the image file to a folder "uimages" in the root. I have made changes in the html file for the compact display of the image by defining "max-height" and "max-width". But i want to resize the image file on upload. The image file may have a maximum width of 100px and maximum height of 150px. The image proportions must be constrained. That is, the image may be smaller than the above dimensions, but, it should not exceed the limit. How can I make this possible?? Thanks in advance :) blasteralfred..

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >