Search Results

Search found 20378 results on 816 pages for 'resize image'.

Page 19/816 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • How to get image from relative URL in C#, the image cannot be in the project

    - by red-X
    I have a project where I'm loading relative image Uri's from an xml file. I'm loading the image like this: if (child.Name == "photo" && child.Attributes["href"] != null && File.Exists(child.Attributes["href"].Value)) { Image image = new Image(); image.Source = new BitmapImage(new Uri(child.Attributes["href"].Value, UriKind.RelativeOrAbsolute)); images.Add(image); } Where the "child" object is an XmlNode which could looks like this <photo name="info" href="Resources\Content\test.png"/> During debug it seemd images is filled with actual images but when I want to see them in any way it shows nothing. Weird thing is when I include the images in my project it does work, I however dont want to do that since my point for using an xml file is so that it would be lost since you'd have to rebuild the program anyway after a change.

    Read the article

  • How do you position a background image inside a <div>?

    - by Giffyguy
    My code currently looks like this: <div style="position: fixed; width: 35.25%; height: 6.75%; left: 0%; top: 4.625%; right: 64.75%; bottom: 88.625%; color: #D1E231; text-align: center; background-color: #666666; background-image: url('FleurTR.png'); background-position: right top;"> <div> The <div> shows up just fine, with the grey background color, but the background image won't show up at all. What am I missing here? There's no reason I should have to specify background-attachment or background-repeat, right? (I don't want it to repeat.)

    Read the article

  • would have only saved the resized images

    - by saadan
    I want it to only saves the resized images so have tried to do so it deletes the original image again after it has been uploaded but can not because it says the image is being used by another process please help. and can not simply remove where it stores the original because it uses it to resize i Use this code to save the fils string tempPath = "Galleryt"; string imgPath = "Gallery"; string savePath = Path.Combine(Request.PhysicalApplicationPath, tempPath); string imgSavePath = Path.Combine(Request.PhysicalApplicationPath, imgPath); string imgSavePath2 = Path.Combine(Request.PhysicalApplicationPath, imgPath); string ProductImageNormal = Path.Combine(imgSavePath, imageName + Fileupload1.PostedFile.FileName); string ProductImagetemp = Path.Combine(savePath, "t__" + imageName + Fileupload1.PostedFile.FileName); string ProductImagetemp2 = Path.Combine(imgSavePath2, "b__" + imageName + Fileupload1.PostedFile.FileName); string extension = Path.GetExtension(Fileupload1.PostedFile.FileName); switch (extension.ToLower()) { case ".png": goto case "Upload"; case ".gif": goto case "Upload"; case ".jpg": goto case "Upload"; case "Upload": Fileupload1.PostedFile.SaveAs(ProductImageNormal); ImageTools.GenerateThumbnail(ProductImageNormal, ProductImagetemp, 250, 350, true, "heigh"); ImageTools.GenerateThumbnail(ProductImageNormal, ProductImagetemp2, 600, 600, true, "heigh"); Label1.Text = ""; break; default: Label1.Text = "Status: Denne filtype er ikke tilladt"; return; } } if i try to delete the original file just after with code File.Delete(Server.MapPath("~/Gallery/" + imageName + Fileupload1.PostedFile.FileName));

    Read the article

  • What is the best algorithm to locate a point in an image file?

    - by suugaku
    Hi all, I want to create a mark sheet recognizer. Here is the description: My system uses black and white color scheme. The mark sheet paper has a small black rectangle on each corner and an additional small black rectangle, to determine orientation, near one of the previous rectangles. The paper is scanned to yield an image (in bmp format for example). The first step is to locate these five references in image as eficient as possible. My rough idea is to trace row by row and from left to right for each row. It sounds very slow I think. Is there any better way to do that? Thank you in advance. regards, Suugaku

    Read the article

  • Jquery resizing image

    - by michele
    I'd like to start a discussion about the image resizing using jQuery. That's my contribution: But I think I'm far away from the solution. What about the cropping? Who can help me? $(document).ready(function() { $('.story-small img').each(function() { var maxWidth = 100; // Max width for the image var maxHeight = 100; // Max height for the image var ratio = 0; // Used for aspect ratio var width = $(this).width(); // Current image width var height = $(this).height(); // Current image height // Check if the current width is larger than the max if(width > maxWidth){ ratio = maxWidth / width; // get ratio for scaling image $(this).css("width", maxWidth); // Set new width $(this).css("height", height * ratio); // Scale height based on ratio height = height * ratio; // Reset height to match scaled image } // Check if current height is larger than max if(height > maxHeight){ ratio = maxHeight / height; // get ratio for scaling image $(this).css("height", maxHeight); // Set new height $(this).css("width", width * ratio); // Scale width based on ratio width = width * ratio; // Reset width to match scaled image } }); });

    Read the article

  • jQuery click event on image only fires once

    - by stephenreece@
    I created a view of thumbnails. When the user clicks, I want the real image to pop-up in a dialog. That works the first time, but once the jQuery 'click' fires on an thumbnail it never fires again unless I reload the entire page. I've tried rebinding the click events on the dialog close that that does not help. Here is my code: function LoadGalleryView() { $('img.gallery').each(function(){ BindImage($(this)); }); } function BindImage(image) { var src= image.attr('src'); var id= image.attr('id'); var popurl = src.replace("thumbs/", ""); image.hover(function(){ image.attr('style', 'height: 100%; width: 100%;'); }, function(){ image.removeAttr('style'); }); $('#'+id).live('click', function() { PopUpImage(popurl); }); } function CheckImage(img,html) { if ( img.complete ) { $('#galleryProgress').html(''); var imgwidth = img.width+35; var imgheight = img.height+65; $('<div id="viewImage" title="View"></div>').html(html).dialog( { bgiframe: true, autoOpen: true, modal: true, width: imgwidth, height: imgheight, position: 'center', closeOnEscape: true }); } else { $('#galleryProgress').html('<img src="images/ajax-loader.gif" /><br /><br />'); setTimeout(function(){CheckImage(img,html);},10); } } function PopUpImage(url) { var html = '<img src="'+url+'" />'; var img = new Image(); img.src = url; if ( ! img.complete ) { setTimeout(function(){CheckImage(img,html);},10); } } PopUpImage() only executes the first time an image is clicked and I cannot figure out how to rebind.

    Read the article

  • How to fix Java Image Fetcher error ?

    - by Frank
    My code looks like this : private static JFileChooser fc; if (fc==null) { fc=new JFileChooser(Image_Dir); fc.addChoosableFileFilter(new Image_Filter()); // Add a custom file filter and disable the default (Accept All) file filter. fc.setAcceptAllFileFilterUsed(false); fc.setAccessory(new Image_Preview(fc)); // Add the preview pane. } int returnVal=fc.showDialog(JFileChooser_For_Image.this,"Get Image"); // Show it. After I select an image from the panel, I got the following error message : Exception in thread "Image Fetcher 0" java.lang.UnsatisfiedLinkError: Native Library C:\Program Files (x86)\Java\jre6\bin\jpeg.dll already loaded in another classloader at java.lang.ClassLoader.loadLibrary0(Unknown Source) at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at sun.security.action.LoadLibraryAction.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.awt.image.JPEGImageDecoder.<clinit>(Unknown Source) at sun.awt.image.InputStreamImageSource.getDecoder(Unknown Source) at sun.awt.image.FileImageSource.getDecoder(Unknown Source) at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source) at sun.awt.image.ImageFetcher.fetchloop(Unknown Source) at sun.awt.image.ImageFetcher.run(Unknown Source) When I run it from an executable Jar file, it works fine, but after I wrapped it into an exe file, I got the above error, why ? How to fix it ?

    Read the article

  • Error Reading Image

    - by javawarrior
    When I tried to open a simple smile.png image using package com.java3d.java3d.graphics; import java.awt.Color; import java.awt.image.BufferedImage; import java.io.File; import javax.imageio.ImageIO; public class Texture { public static Render floor = loadBitMap("smile.png"); public Texture(){} public static Render loadBitMap(String fileName) { try { BufferedImage image = ImageIO.read(Thread.currentThread().getContextClassLoader().getResource(fileName)); System.out.print(image==null); int width = image.getWidth(); System.out.println(width); int height = image.getHeight(); System.out.println(height); System.out.println(image.getRGB(4, 4)); Render result = new Render(width, height); image.getRGB(0, 0, width, height, result.pixels, 0, width); return result; } catch (Exception e) { System.out.println("CRASH!"); throw new RuntimeException(e); } } } it returns every pixel as -1; what could be causing this problem? Here is the image:

    Read the article

  • live image edit , and crop

    - by 422
    I was just thinking, which is always dangerous. We use Valums Image uploader. Aside from that, I am looking for an inline image editor, but with a difference. User uploads an image ( lets say 800 x 600 ) Our system wants to see the image ( 170 x 32 ) now I know we can use php to resize images. But I was thinking, does anyone know of a system, where we can display the image, and user can scale, and crop image ( with say a predefined overlay ) By that they scale down to nearest acceptable size, and then click crop tool, which shows a div overlay with say 70% transparency that they can drag over the image, and then click crop. So image is cropped to exact size we need, then can save . I am sure I have seen some jquery stuff done like this, just cannot for life of me find it. Essentialy, we would like to offer a simple client side image processor, thats lightweight, and then the ability to save what they did . Sorry no code to show, as its more of a request. Regards

    Read the article

  • How do I create a background image on web page?

    - by kasha
    I am a new designer so hopefully this question isn't too basic! How do I create a background image on a webpage for a programmer? I designed the page in photoshop and I would like to know how to send the background image (the 25% opacity buildings overlay). I would be happy to send the main image (but it is too large and I imagine would slow the site and loading time drastically). here is the link to the design... http://problemio.com/home_page_1_1.pdf

    Read the article

  • how to apply the center of image view for another image view center

    - by maddy
    hi, I am developing image redraw app. i know the center of one image view which is having scaling property. i.e it can change it frame and center . that to be applied to another view center. when i apply center to newly formed Image view it giving wrong center because of the previous image view is having scaling property. so how can i get exact center to my new image view from previous imageview

    Read the article

  • Java Swing: Resize JMenuItem's icon, either automatically or programatically?

    - by TGP1994
    It seems that JMenuItems don't automatically resize any image icon that's assigned to them, and from what I can tell, there isn't a property that makes them automatically do that, either. Is anyone aware of a way that I can programatically resize the Icon for a JMenuItem? It seems like the Icon object is lacking functionality as it is, unless there's some other function that can actually deal with Icon objects.

    Read the article

  • mkisofs - Floppy Image to Disk Image

    - by CommunistPancake
    I'm trying to compile MikeOS on windows. I've successfully (I think) created a floppy (.flp) image of the operating system. I want to convert it to a disk image (.iso) so I can run it in virtual box. I've tried mkisofs -quiet -V 'MIKEOS' -input-charset iso8859-1 -o disk_images/mikeos.iso -b mikeos.flp disk_images/ Which is the command in the Linux build script. It does create an ISO image, but when I try to run in in VirtualBox, I get a black screen. What am I doing wrong? Here's my build script.

    Read the article

  • on hover overlay image in CSS

    - by Juventus
    I need a div with picture bg to overlay an image (with some amount transparency) when hovered on. I need to be able to have one transparent overlay that can be used and reused throughout the site on any image. My first attempt was round-about to say the least. Because I found out you cannot roll-over an invisible div I devised a sandwhich system in which the original image is the first layer, the overlay is the second layer, and the original image is third layer again. This way, when you roll-over, the original image disappears revealing the overlay image over the original image: http://www.nightlylabs.com/uploads/test.html So it works. Kinda. Because of you cannot interact with an visibility:invisible element (why?!) the roll-over flickers unless you rest the cursor on it. Any help? This method is bad so if anyone has a better one please comment.

    Read the article

  • How to Clear an image control in WPF (C#)

    - by antongladchenko
    I have an image control with a source image located in my c drive. I get a message that the image is being used by another process whenever I try to delete the original image to change it with another one dynamically. How do I release the image from the image control to be able to delete it. I tried this variants: string path = ((BitmapImage)img.Source).UriSource.LocalPath; img.SetValue(System.Windows.Controls.Image.SourceProperty, null); File.Delete(path); And: string path = ((BitmapImage)img.Source).UriSource.LocalPath; img.Source = null; File.Delete(path) But it's not work...

    Read the article

  • image loading information with jquery

    - by Pradyut Bhattacharya
    Hi I have a page which has a img holder with the html: - <img src="someimage.jpeg" alt="image" class="show_image"/> Now i m updating the image with jquery using the code... $('.show_image').attr('src', 'anotherimage.jpeg'); Now its working fine but i want to show the users the image is being loaded and may wait as the image size may be huge... Is there any method in jquery to get the information of percent loaded(bytes read/remaining) or if the image load is complete... Also how can i place a div over the image placeholder such that the div can fade the image(opacity:0.8) and add some text over the div as loading or something thanks

    Read the article

  • Help Reading Binary Image Data from SQL Server into PHP

    - by Joe Majewski
    I cannot seem to figure out a way to read binary data from SQL server into PHP. I am working on a project where I need to be able to store the image directly in the SQL table, not on the file system. Currently, I have been using a query like this one: INSERT INTO myTable(Document) SELECT * FROM OPENROWSET(BULK N'C:\image.jpg', SINGLE_BLOB) as BLAH This works fine to actually insert the image into the table, but I haven't yet figured a way to retrieve it and get my image back. I am doing this with PHP, and ultimately will have to make a stored procedure out of it, but can anyone enlighten me on a way to get that binary data (varbinary(MAX)) and generate an image on the fly. I expected it to be simple to use a SELECT statement and add a content-type to the headers that indicated it was an image, but it's simply not working. Instead, the page will just display the name of the file, which I have encountered in the past and understand it to be an error with the image data.

    Read the article

  • An image from byte to optimized web page presentation

    - by blgnklc
    I get the data of the stored image on database as byte[] array; then I convert it to System.Drawing.Image like the code shown below; public System.Drawing.Image CreateImage(byte[] bytes) { System.IO.MemoryStream memoryStream = new System.IO.MemoryStream(bytes); System.Drawing.Image image = System.Drawing.Image.FromStream(memoryStream); return image; } (*) On the other hand I am planning to show a list of images on asp.net pages as the client scrolls downs the page. The more user gets down and down on the page he/she does see the more photos. So it means fast page loads and rich user experience. (you may see what I mean on www.mashable.com, just take care the new loads of the photos as you scroll down.) Moreover, the returned imgae object from the method above, how can i show it in a loop dynamically using the (*) conditions above. Regards bk

    Read the article

  • Discovered: Run A Video In An Image

    - by Moon .
    okay i have found the way to run a video in a image.... the procedure as given below 1 - Run a video in Windows Media Player 2 - While the video running, Press Print Screen 3 - Paste it in MS Paint 4 - Save the image in JPEG or BMP format 5 - Run any video in Windows Media Player again 6 - Now open that image, in Windows Page\Fax Viewer or ACDsee etc. 7 - at this time the win. media player is playing and the image is open 8- Switch to image (focus on image) and you will see the currently running video in the image can anybody with extensive knowledge of windows tell me why does this happen. Well this doesn't work in all versions of windows and media players. i tried this on the follwing setup Windows Media Player 10 Windows XP 2006 SP2

    Read the article

  • Trouble adding Image to a JPanel

    - by user1276078
    I'm making a video game, and I need to add an image to a JPanel and then add that JPanel to a JFrame. All of the tutorials I've seen say to add it to a JLabel, but the image needs to be able to move around. Unless you can move a JLabel around, I can't do that. How would I be able to add an Image directly to a JPanel. This is what I have so far, but it is just like it was on a JApplet class Penguin extends JPanel { public Image image; public void paintComponent( Graphics g ) { image = getImage( getDocumentBase(), "Penguins.jpg" ); g.drawImage( image, 0, 0, this ); } }

    Read the article

  • Delay the display of image loaded using jquery + ajax

    - by niczoom
    I am using the following code : $.ajax({ url: "pgiproxy.php", data: ({ data : $("#formdata").serialize(), mode : "graph"}), success: function(result){ var temp = $('<div/>').html(result); var val = temp.find('center').html(); $('#BFX').html(val); }, error: function(){ $("#error").html("ERROR !!!"); } }); The 'result' from the ajax call to 'pgiproxy.php' is a whole web page (returned as a string), this is then converted to a jQuery object and stored in 'var'. I then extract the data I need (a .gif image) using .find() which is stored in 'val'. This image is then inserted into a #BFX div for display. My problem is every successive time I click my button to update this image it shows the image loading from top to bottom as it is reading it in from the web. Is there a way to only display this image once it has fully loaded so the user doesnt see the image loading and only sees the image change instantly.

    Read the article

  • BlackBerry - Cropping image

    - by rupesh
    Hi all i want to crop a part of Image ,for that i am using following code: int x=20; int y=50; int [] rgbdata=new int[(0+width-x+height-y)* (image.getWidth())]; image.getARGB(rgbdata, 0, image.getWidth(), x, y, width, height); cropedImage=new Bitmap(image.getWidth(),image.getWidth()); cropedImage.setARGB(rgbdata, 0,image.getWidth(), 80,80, width, height); x an y are the position from where the cropping will be done in the rectangular form. but it is not working can any one help me out please. any sample code will work for me. its urgent. thanks in advance

    Read the article

  • Light effect with image magick

    - by GuilhermeA
    Hello, I'm using ImageMagick to resize an image to a smaller size gif. In this process I'm trying to give the image a light effect, not a side-light, just like a shiny look all over. Not a good comparison but for a better understanding think of an image seen in a old screen or an image seen in glossy monitor - I'm trying to enhance the image the closest to this point. An important point is that I can't make a image-to-image treatment, it must be something that I can use in all the images. I know ImageMagick is a powerful tool, and can certainly do something for my images! Many thanks!

    Read the article

  • python convert 12 bit image encoded in a string to 8 bit png

    - by ks
    I have a string that is read from a usb apogee camera that is a 12-bit grayscale image with the 12-bits each occupying the lowest 12 bits of 16-bits words. I want to create a 8-bit png from this string by ignoring the lowest 4 bits. I can convert it to a 16-bit image where the highest 4 bits are always zero using PIL with import Image imageStr is the image string imageSize is the image size img=Image.fromstring("I", imageSize, imageStr, "raw", "I;16", 0,1) img.save("MyImage.png", "PNG") Anyway I can do something similar to create a 8-bit image without completely unpacking the string doing arithmetic and making a new string?

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >