Search Results

Search found 20691 results on 828 pages for 'iso image'.

Page 22/828 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • Issue while saving image using savefiledialog

    - by user1097772
    I'm using savefiledialog to save an image. Canvas is picturebox and the loaded image is bitmap. When I try to save it the file is created but somehow corrupted. Cause when I try againt load the image or show in different viewer it doesn't work - I mean the saved file is corrupted. There is an method for saving image. private void saveFileDialog1_FileOk(object sender, CancelEventArgs e) { System.IO.FileStream fs = (System.IO.FileStream)saveFileDialog1.OpenFile(); try { switch (saveFileDialog1.FilterIndex) { case 1: canvas.Image.Save(saveFileDialog1.FileName, System.Drawing.Imaging.ImageFormat.Bmp); break; case 2: canvas.Image.Save(saveFileDialog1.FileName, System.Drawing.Imaging.ImageFormat.Jpeg); break; case 3: canvas.Image.Save(saveFileDialog1.FileName, System.Drawing.Imaging.ImageFormat.Png); break; case 4: canvas.Image.Save(saveFileDialog1.FileName, System.Drawing.Imaging.ImageFormat.Tiff); break; } } catch (Exception ex) { System.Console.WriteLine("Exception " + ex); } I should also mention the property Filter. saveFileDialog1.Filter has value: bmp (*.bmp)|*.bmp|jpeg (*.jpeg)|*.jpeg|png (*.png)|*.png|tiff (*.tiff)|*.tiff

    Read the article

  • Recommended/Standard image thumbnails sizes

    - by Rakan
    Hello, Based on my experience in web development, HTML page designs for every website may have different < img tags showing the same image in different sizes. i.e: the website's main page might show the image in 500*500, the listing page might show it in 200*150 and other sections of the website will use different sizes. As you can see the ratios of the images to be displayed to the user are different and therefore will cause a problem in having the image stretched, pixelated and/or other quality problems. How i currently handle this issue is by using a jQuery cropping tool to make the user select the area to crop the thumbnail from. the cropped image is then resized using imagick to fit every position in the page design. However, although i can force the user to crop an image based on a pre-defined ratio, the HTML will still contain image placeholders which require a different ratio for its thumbnail. So for every image, i will have to force the user to crop the uploaded image based on every possible ratio my site requires. I don't think this is a friendly solution, how would you do it? is there a standard/recommended ratio for the web? Thanks

    Read the article

  • Silverlight Image Data Binding

    - by Alexander
    I am new to Silverlight, and have an issue with binding. I have a class ItemsManager, that has inside its scope another class Item. class ItemsManager { ... class Item : INotifyPropertyChanged { ... private BitmapImage bitmapSource; public BitmapImage BitmapSource { get { return bitmapSource; } set { bitmapSource = value; if(PropertyChanged != null )PropertyChanged("BitmapSource") } } } } I do the following in code to test binding: { ItemsManager.Instance.AddItem("123"); //Items manager started downloading item visual //part (in my case bitmap image png) Binding b = new Binding("Source"); b.Source = ItemsManager.Instance.GetItem("123").BitmapSource; b.BindsDirectlyToSource = true; Image img = new Image(); img.SetBinding(Image.SourceProperty, b); img.Width = (double)100.0; img.Height = (double)100.0; LayoutRoot.Children.Add(img); } Once image is loaded, image doesn't appear. Though, if I set directly after image has been loaded its source, it displays well. I also noticed that PropertyChanged("BitmapSource") never fires, because PropertyChanged is null, like Image never binded to it. I am looking forward to hearing from you!

    Read the article

  • java setting resolution and print size for an Image

    - by Ingrid
    I wrote a program that generates a BufferedImage to be displayed on the screen and then printed. Part of the image includes grid lines that are 1 pixel wide. That is, the line is 1 pixel, with about 10 pixels between lines. Because of screen resolution, the image is displayed much bigger than that, with several pixels for each line. I'd like to draw it smaller, but when I scale the image (either by using Image.getScaledInstance or Graphics2D.scale), I lose significant amounts of detail. I'd like to print the image as well, and am dealing with the same problem. In that case, I am using this code to set the resolution: HashPrintRequestAttributeSet set = new HashPrintRequestAttributeSet(); PrinterResolution pr = new PrinterResolution(250, 250, ResolutionSyntax.DPI); set.add(pr); job.print(set); which works to make the image smaller without losing detail. But the problem is that the image is cut off at the same boundary as if I hadn't set the resolution. I'm also confused because I expected a larger number of DPI to make a smaller image, but it's working the other way. I'm using java 1.6 on Windows 7 with eclipse.

    Read the article

  • Problem in displaying image in FireFox

    - by Param-Ganak
    Hello friends, I have a JSP page on which I have a div tag in which there is a a IMG tag. Using this IMG tag I want to show an image in it. Here the source path of an image is comes from database so I assigned a JSP variable using JSP scriplet. This JSP variable have the source path of an image. This path of image may be of different machine or of same machine i.e. images are stored on different machine or on same machine i.e. on local machine on different drive. The problem is that how to give path of image stored on different machine as well as on same machine. I have tried different ways like by giving ip address of that machine. Here is the path that of local machine where the image is stored img src= file:\localhost\D:\ScannedSheets\testproj/batch1/IMG001.jpg style="z-index:1; position:absolute; top:0; left:0; width:850; height:1099" With this syntax the image is visible in Internet Explorer but With the same syntax Its not visible in FireFox, Google Chrome etc. Please Guide me in friends. Also tell me that how to give path of the image stored on different machine which works In Internet Explorer, FireFox, Google chrome etc.

    Read the article

  • Ajax Update Panel Not Displaying Updated Image in IE, Chrome and FireFox

    - by jmease
    I have a parent page with an Ajax Update Panel that contains an image and a button. There is a hyperlink that opens up a child page. When the child page is submitted, there is an onclientclick event that triggers a javascript function that clicks the button in the update panel on the parent page, the button's click event being the trigger for the panel as well as the event that updates the image URL. When I use this on my android tablet, it works perfectly. However, it doesn't work at all on any browser I've used on a PC (Windows XP). The Image URL updates, but the updated image doesn't display without refreshing the entire page. In IE, I can right click on the image and click Show Image and it updates. In Chrome and Firefox, I have to refresh the entire page. Why would an Ajax control only work properly on the Android OS and what could I be doing wrong that would cause the image not to redisplay on my PC without refreshing the page even though the image URL is clearly being updated properly. I suspect a caching issue, but don't know how to correct.

    Read the article

  • Show image on hover with PHP

    - by Sorosh
    I have a small problem with my PHP code and It would be very nice if someone could help me. I want to display an image when hovering over a link. This is the link with the PHP code that I have now: <a href="<?php the_permalink(); ?>"><?php if ( has_post_thumbnail() ) {the_post_thumbnail();} else if ( has_post_video() ) {the_post_video_image();}?></a> This code shows a image, but I want to execute this code when hovering over the link with the image: <?php echo print_image_function(); ?> The code also shows a image that belongs to a category. I don't want the initial image to disappear I simply want to show the second image on top off the first image when hovering over the first image. I don't know if it is helpful but I use Wordpress and I am not a PHP expert. I even don't know if this is going to work. Thats why I am asking if somebody can help me with this. Thanks in advance

    Read the article

  • Why would Copying a Large Image to the Clipboard Freeze a Computer?

    - by Akemi Iwaya
    Sometimes, something really odd happens when using our computers that makes no sense at all…such as copying a simple image to the clipboard and the computer freezing up because of it. An image is an image, right? Today’s SuperUser post has the answer to a puzzled reader’s dilemna. Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites. Original image courtesy of Wikimedia. The Question SuperUser reader Joban Dhillon wants to know why copying an image to the clipboard on his computer freezes it up: I was messing around with some height map images and found this one: (http://upload.wikimedia.org/wikipedia/commons/1/15/Srtm_ramp2.world.21600×10800.jpg) The image is 21,600*10,800 pixels in size. When I right click and select “Copy Image” in my browser (I am using Google Chrome), it slows down my computer until it freezes. After that I must restart. I am curious about why this happens. I presume it is the size of the image, although it is only about 6 MB when saved to my computer. I am also using Windows 8.1 Why would a simple image freeze Joban’s computer up after copying it to the clipboard? The Answer SuperUser contributor Mokubai has the answer for us: “Copy Image” is copying the raw image data, rather than the image file itself, to your clipboard. The raw image data will be 21,600 x 10,800 x 3 (24 bit image) = 699,840,000 bytes of data. That is approximately 700 MB of data your browser is trying to copy to the clipboard. JPEG compresses the raw data using a lossy algorithm and can get pretty good compression. Hence the compressed file is only 6 MB. The reason it makes your computer slow is that it is probably filling your memory up with at least the 700 MB of image data that your browser is using to show you the image, another 700 MB (along with whatever overhead the clipboard incurs) to store it on the clipboard, and a not insignificant amount of processing power to convert the image into a format that can be stored on the clipboard. Chances are that if you have less than 4 GB of physical RAM, then those copies of the image data are forcing your computer to page memory out to the swap file in an attempt to fulfil both memory demands at the same time. This will cause programs and disk access to be sluggish as they use the disk and try to use the data that may have just been paged out. In short: Do not use the clipboard for huge images unless you have a lot of memory and a bit of time to spare. Like pretty graphs? This is what happens when I load that image in Google Chrome, then copy it to the clipboard on my machine with 12 GB of RAM: It starts off at the lower point using 2.8 GB of RAM, loading the image punches it up to 3.6 GB (approximately the 700 MB), then copying it to the clipboard spikes way up there at 6.3 GB of RAM before settling back down at the 4.5-ish you would expect to see for a program and two copies of a rather large image. That is a whopping 3.7 GB of image data being worked on at the peak, which is probably the initial image, a reserved quantity for the clipboard, and perhaps a couple of conversion buffers. That is enough to bring any machine with less than 8 GB of RAM to its knees. Strangely, doing the same thing in Firefox just copies the image file rather than the image data (without the scary memory surge). Have something to add to the explanation? Sound off in the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.

    Read the article

  • GD! Converting a png image to jpeg and making the alpha by default white and not black.

    - by Shawn
    I tried something like this but it just makes the background of the image white, not necessarily the alpha of the image. I wanted to just upload everything as jpg's so if i could somehow "flatten" a png image with some transparently to default it to just be white so i can use it as a jpg instead. Appreciate any help. Thanks. $old = imagecreatefrompng($upload); $background = imagecolorallocate($old,255,255,255); imagefill($old, 0, 0, $background); imagealphablending($old, false); imagesavealpha($old, true);

    Read the article

  • asp.net image aspect ratio help

    - by StealthRT
    Hey all, i am in need of some help with keeping an image aspect ratio in check. This is the aspx code that i have to resize and upload an image the user selects. <%@ Page Trace="False" Language="vb" aspcompat="false" debug="true" validateRequest="false"%> <%@ Import Namespace=System.Drawing %> <%@ Import Namespace=System.Drawing.Imaging %> <%@ Import Namespace=System %> <%@ Import Namespace=System.Web %> <SCRIPT LANGUAGE="VBScript" runat="server"> const Lx = 500 ' max width for thumbnails const Ly = 60 ' max height for thumbnails const upload_dir = "/uptest/" ' directory to upload file const upload_original = "sample" ' filename to save original as (suffix added by script) const upload_thumb = "thumb" ' filename to save thumbnail as (suffix added by script) const upload_max_size = 512 ' max size of the upload (KB) note: this doesn't override any server upload limits dim fileExt ' used to store the file extension (saves finding it mulitple times) dim newWidth, newHeight as integer ' new width/height for the thumbnail dim l2 ' temp variable used when calculating new size dim fileFld as HTTPPostedFile ' used to grab the file upload from the form Dim originalimg As System.Drawing.Image ' used to hold the original image dim msg ' display results dim upload_ok as boolean ' did the upload work ? </script> <% randomize() ' used to help the cache-busting on the preview images upload_ok = false if lcase(Request.ServerVariables("REQUEST_METHOD"))="post" then fileFld = request.files(0) ' get the first file uploaded from the form (note:- you can use this to itterate through more than one image) if fileFld.ContentLength > upload_max_size * 1024 then msg = "Sorry, the image must be less than " & upload_max_size & "Kb" else try originalImg = System.Drawing.Image.FromStream(fileFld.InputStream) ' work out the width/height for the thumbnail. Preserve aspect ratio and honour max width/height ' Note: if the original is smaller than the thumbnail size it will be scaled up If (originalImg.Width/Lx) > (originalImg.Width/Ly) Then L2 = originalImg.Width newWidth = Lx newHeight = originalImg.Height * (Lx / L2) if newHeight > Ly then newWidth = newWidth * (Ly / newHeight) newHeight = Ly end if Else L2 = originalImg.Height newHeight = Ly newWidth = originalImg.Width * (Ly / L2) if newWidth > Lx then newHeight = newHeight * (Lx / newWidth) newWidth = Lx end if End If Dim thumb As New Bitmap(newWidth, newHeight) 'Create a graphics object Dim gr_dest As Graphics = Graphics.FromImage(thumb) ' just in case it's a transparent GIF force the bg to white dim sb = new SolidBrush(System.Drawing.Color.White) gr_dest.FillRectangle(sb, 0, 0, thumb.Width, thumb.Height) 'Re-draw the image to the specified height and width gr_dest.DrawImage(originalImg, 0, 0, thumb.Width, thumb.Height) try fileExt = System.IO.Path.GetExtension(fileFld.FileName).ToLower() originalImg.save(Server.MapPath(upload_dir & upload_original & fileExt), originalImg.rawformat) thumb.save(Server.MapPath(upload_dir & upload_thumb & fileExt), originalImg.rawformat) msg = "Uploaded " & fileFld.FileName & " to " & Server.MapPath(upload_dir & upload_original & fileExt) upload_ok = true catch msg = "Sorry, there was a problem saving the image." end try ' Housekeeping for the generated thumbnail if not thumb is nothing then thumb.Dispose() thumb = nothing end if catch msg = "Sorry, that was not an image we could process." end try end if ' House Keeping ! if not originalImg is nothing then originalImg.Dispose() originalImg = nothing end if end if %> What i am looking for is a way to just have it go by the height of what i set it: const Ly = 60 ' max height for thumbnails And have the code for the width just be whatever. So if i had an image... say 600 x 120 (w h) and i used photoshop to change just the height, it would keep it in ratio and have it 300 x 60 (w x h). Thats what i am looking to do with this code here. However, i can not think of a way to do this (or to just leave a wildcard for the width setting. Any help would be great :o) David

    Read the article

  • How do I use CSS to add a non-rectangular border around an image?

    - by KPL
    Hello people, I have three images, and they are not square or rectangular in shape. They are just like face of anyone. So, basically, my images are in the size 196x196 or anything like that, but complete square or rectangle with the face in the middle and transperant background in the rest of the portion. Now, I want to remove the transperant background too and just keep the faces. Don't know if this is possible and mind you, this isn't a programming question. EDIT (from comments): How do I put a border around the shape of the image, not a rectangular one around the boundary, using CSS.

    Read the article

  • How to create and import image into openstack?

    - by can.
    I downloaded the image precise-server-cloudimg-amd64-disk1.img from http://uec-images.ubuntu.com/releases/precise/release/ , then I tried to import it into openstack using: glance -v add name="ubuntu1204" is_public=true container_format=ovf disk_format=qcow2 < precise-server-cloudimg-amd64-disk1.img The import seems OK but when I launched it I encountered error. Where did I do wrong and what's the right procedure of creating and importing image into openstack?

    Read the article

  • Partition Label Problem after DD Image

    - by bobby
    After imaging a 100GB hard drive into an image file with dd, I dd'd the image to a larger hdd After boot get mkrootdev: label / not found I have gone in with finnix and relabeled the partition to the same label with e2label and still have problems. Has anyone resolved this before?

    Read the article

  • Citrix XenDesktop create an image to work across multiple hardware devices

    - by JohnyV
    I have created an image using this guide http://support.citrix.com/article/CTX119877. However this only works for virtual and the model that I made the image on how can i extend compatibility to another device? I am just using it for a vdisk that I can then also use as a virtual device but I wasnt the vdisk to be available over multiple devices. Using Win 7 on the client. Thanks

    Read the article

  • Clean install vs disk image

    - by Thanos
    Once a year I am making a clean install on windows, in order to keep my system fast. After posting a question on making a bootable windows usb with exe programs where I was adviced to make a disk image, a new question rose. What is the difference in making a disk image and performing a clean install on windows? Which is better in terms of speed, general performance, value for time and transfering between different computers?

    Read the article

  • How can I convert a bunch of files from ISO-8859-1 to UTF-8 using Perl?

    - by tau
    I have several documents I need to convert from ISO-8859-1 to UTF-8 (without the BOM of course). This is the issue though. I have so many of these documents (it is actually a mix of documents, some UTF-8 and some ISO-8859-1) that I need an automated way of converting them. Unfortunately I only have ActivePerl installed and don't know much about encoding in that language. I may be able to install PHP, but I am not sure as this is not my personal computer. Just so you know, I use Scite or Notepad++, but both do not convert correctly. For example, if I open a document in Czech that contains the character "ž" and go to the "Convert to UTF-8" option in Notepad++, it incorrectly converts it to an unreadable character. There is a way I CAN convert them, but it is tedious. If I open the document with the special characters and copy the document to Windows clipboard, then paste it into a UTF-8 document and save it, it is okay. This is too tedious (opening every file and copying/pasting into a new document) for the amount of documents I have. Any ideas? Thanks!!!

    Read the article

  • minimal gnome classic on a mini.iso ubuntu 12.04

    - by amr
    I installed ubuntu 12.04 from the mini.iso I want the most minimal classic gnome possible, all I ever need is a terminal, wireless connection, chromium and mid-night commander. No video or audio players no office no nautilus and no other applications. How can this be achieved? I also don't want a log in graphical interface like GDM or lightdm , I'll be happy to log in using the command line. Thanks in advance

    Read the article

  • ISO Format

    One of the most common file types used in the distribution of software over the Internet is the .ISO format; these single files contain within them an exact copy of an entire CD or DVD disc. They are... [Author: Chris Holgate - Computers and Internet - April 05, 2010]

    Read the article

  • Acordex Image viewer throws out of memory exception in CITRIX environment

    - by neha
    We have a .net 2.0 application. In the .aspx page we are calling the java applet using . This applet is calling the Acordex Image viewer. In the production environment users are facing "out of memory" or "insufficient memory" issues when users try to open the image or magnify an image in Acordex viewer. Strangely when the users logout and login again they are able to see the same image without any errors. The website is hosted in a CITRIX environment. We have access to this environment but we are not able to reproduce this issue on the test servers or the local machines. We dont know what is causing this issue. What should we do to troubleshoot the issue? Do we have to increase the memory allotted to the users in CITRIX? The RAM is around 4 gb. Number of simultaneous users - 10-13. image size is max 2 mb Following is the code used to call Acordex image viewer:

    Read the article

  • Codeigniter image manipulation class rotates image during resize

    - by someoneinomaha
    I'm using Codeigniter's image manipulation library to re-size an uploaded image to three sizes, small, normal and large. The re-sizing is working great. However, if I'm resizing a vertical image, the library is rotating the image so it's horizontal. These are the config settings I have in place: $this->resize_config['image_library'] = 'gd2'; $this->resize_config['source_image'] = $this->file_data['full_path']; $this->resize_config['maintain_ratio'] = TRUE; // These change based on the type (small, normal, large) $this->resize_config['new_image'] = './uploads/large/'.$this->new_file_name.'.jpg'; $this->resize_config['width'] = 432; $this->resize_config['height'] = 288; I'm not setting the master_dim property because the default it set to auto, which is what I want. My assumption is that the library would take a vertical image, see that the height is greater than the width and translate the height/width config appropriately so the image remains vertical. What is happening (apparently) is that the library is rotating the image when it is vertical and sizing it per the configuration. This is the code in place I have to do the actual re-sizing: log_message('debug', 'attempting '.$size.' photo resize'); $this->CI->load->library('image_lib'); $this->CI->image_lib->initialize($this->resize_config); if ($this->CI->image_lib->resize()) { $return_value = TRUE; log_message('debug', $size.' photo resize successful'); } else { $this->errors[] = $this->CI->image_lib->display_errors(); log_message('debug', $size.' photo resize failed'); } $this->CI->image_lib->clear(); return $return_value;

    Read the article

  • Sanity check on this idea for an Image Viewer in a web app

    - by Charlie Flowers
    I have an approach in mind for an image viewer in a web app, and want to get a sanity check and any thoughts you stackoverflowers might have. Here's the whirlwind nutshell summary: I'm working on an ASP.NET MVC application that will run in my company's retail stores. Even though it is a web application, we own the store machines and have control over them. We have a "windows agent" running on the store machine which we can talk to via http post (it is a WCF service, and our web app has permission to talk to it from the browser). One of the web pages needs to be an "image viewer" page with some common things like Rotate & Zoom. Now, there are some WebForms controls that offer Rotate and Zoom. However, they take up server resources and generate a good bit of traffic between the server and the browser. For example, the Rotate function would cause an ajax call to the server, which would then generate a new image written to a .NET Canvas object, which would then be written to a file on the server, which would then be returned from the ajax call and refreshed inside the browser. Normally, that's a pretty good way of doing things. But in our case, we have code running on the store machine that we can communicate with. This leads me to consider the following approach: When the user asks to view an image, we tell our "windows agent" to download it from our image server to the store machine. We then redirect our browser to our image viewer page, which will pull the image from the local file we just wrote to the store machine. When the user clicks "Rotate", we cause JavaScript code in the browser to call our "windows agent" software, asking it to perform the "Rotate" function. The "windows agent" does the rotation using the same kind of imaging control that would formerly have been used on the server, but it does so now on the store machine. Javascript in the browser then refreshes the image on the page to show the newly rotated image. Zoom and similar features would be implemented the same way. This seems to be much more efficient, scalable, and responsive for the end-users. However, I've never heard of anything like it being done, mostly because it's rare to have this combination of a web app plus a "windows agent" on the client machine. What do you think? Feasible? Reasonable? Any pitfalls I overlooked or improvements / suggestions you can see? Has anyone done anything like this who would like to offer the wisdom of experience? Thanks!

    Read the article

  • How do I create an OpenCV image from a PIL image?

    - by scrible
    I want to do some image processing with OpenCV (in Python), but I have to start with a PIL Image object, so I can't use the cvLoadImage() call, since that takes a filename. This recipe (adapted from http://opencv.willowgarage.com/wiki/PythonInterface) does not work because cvSetData complains argument 2 of type 'void *' . Any ideas? from opencv.cv import * from PIL import Image pi = Image.open('foo.png') # PIL image ci = cvCreateImage(pi.size, IPL_DEPTH_8U, 1) # OpenCV image data = pi.tostring() cvSetData(ci, data, len(data)) I think the last argument to the cvSetData is wrong too, but I am not sure what it should be.

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >