Search Results

Search found 26928 results on 1078 pages for 'disk image'.

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

  • Line by line image swing

    - by user1046017
    I want to show an image as it is downloading, I have the URL, and I am trying to get the image parts like this: InputStream openStream = url.openStream(); DataInputStream dis = new DataInputStream(new BufferedInputStream(openStream)); ByteArrayOutputStream os = new ByteArrayOutputStream(); while ((s = dis.read(b)) != -1) { os.write(b , 0, s); support.firePropertyChange("stream", null, os); } This way, any listener get the stream and creates an image, this way: if("stream".equals(evt.getPropertyName())){ try { ByteArrayOutputStream stream = (ByteArrayOutputStream) evt.getNewValue(); byte[] byteArray = stream.toByteArray(); stream.flush(); Image createImage = Toolkit.getDefaultToolkit().createImage(byteArray); this.getContentPane().add(new JLabel(new ImageIcon(createImage))); } catch (IOException ex) { Logger.getLogger(ImageTest.class.getName()).log(Level.SEVERE, null, ex); } } However, I am getting a "Premature end of JPEG file sun.awt.image.ImageFormatException: JPEG datastream contains no image" error, the image is a JPG image format, is there any library or method known to make something similar?

    Read the article

  • iOS get file size on disk

    - by F2_CMD
    I'm trying to get the size on disk of a file in iOS using Objective C. As of now I've been able to get the actual size of the file and other file information using NSFileManager and then getting the attributes attributesOfItemAtPath:error but not the size on disk. I also tried getting the file size from struct stat but again it doesn't give me size on disk.I tried using NSTask to make a call to du -h but iOS didn't allow me to fork other processes. Any ideas are welcome :) I know this questions is similar to many others but the difference is that I'm trying to do this in iOS and most of the methods used in other systems don't work here. Thanks

    Read the article

  • C# Read Byte [] to Image

    - by LucasGuitar
    I have an application which I'm adding pictures and these are automatically converted to binary and stored in a single file. how can I save several images, I keep in an XML file start and size of each set of refente to an image byte. But it has several images in bytes, whenever I try to select a different set of bytes just opening the same image. I would like your help to be able to fix this and open different images. Code //Add Image private void btAddImage_Click(object sender, RoutedEventArgs e) { OpenFileDialog op = new OpenFileDialog(); op.Title = "Selecione a Imagem"; op.Filter = "All supported graphics|*.jpg;*.jpeg;*.png|" + "JPEG (*.jpg;*.jpeg)|*.jpg;*.jpeg|" + "Portable Network Graphic (*.png)|*.png"; if (op.ShowDialog() == true) { imgPatch.Source = new BitmapImage(new Uri(op.FileName)); txtName.Focus(); } } //Convert Image private void btConvertImage_Click(object sender, RoutedEventArgs e) { if (String.IsNullOrEmpty(txtName.Text)) { txtName.Focus(); MessageBox.Show("Preencha o Nome", "Error"); } else { save(ConvertFileToByteArray(op.FileName), txtName.Text); } } //Image to Byte Array private static byte[] ConvertFileToByteArray(String FilePath) { return File.ReadAllBytes(FilePath); } //Save Binary File and XML File public void save(byte[] img, string nome) { FileStream f; long ini, fin = img.Length; if (!File.Exists("Escudos.bcf")) { f = new FileStream("Escudos.bcf", FileMode.Create); ini = 0; } else { f = new FileStream("Escudos.bcf", FileMode.Append); ini = f.Length + 1; bin = new TestBinarySegment(); } bin.LoadAddSave("Escudos.xml", "Brasileiro", nome, ini, fin); BinaryWriter b = new BinaryWriter(f); b.Write(img); b.Close(); f.Dispose(); } //Load Image from Byte private void btLoad_Click(object sender, RoutedEventArgs e) { getImageFromByte(); } //Byte to Image public void getImageFromByte(int start, int length) { using (FileStream fs = new FileStream("Escudos.bcf", FileMode.Open)) { byte[] iba = new byte[fs.Length+1]; fs.Read(iba, start, length); Image image = new Image(); image.Source = BitmapFrame.Create(fs, BitmapCreateOptions.None, BitmapCacheOption.OnLoad); imgPatch2.Source = image.Source; } }

    Read the article

  • Partimage and autocheck problem when restoring Windows XP from image

    - by Xolstice
    I'm trying to create an image of Windows XP and clone it to several partitions on the same hard drive using Partimage. I seem to be running into a problem when I restore the image onto another partition - when I boot into the OS from the partition I just restored, it brings up this message during the boot sequence: autochk program not found - skipping autocheck, and then after this, the OS reboots the PC and the whole process repeats itself in an infinite loop. After doing some Google search, it is suggested that this loop was caused by the partition being hidden or the mountmgr.sys file is missing. I checked my configuration and verified that this was not the case. I'm just wondering: Has anyone else experienced this and is there a solution for it? Is this what happens when you try to restore the image to a different partition on the same hard disk or is Partimage itself the problem? Should I be trying out a different partition cloning software?

    Read the article

  • peer to peer disk image transmission

    - by JackWu
    Installing linux/windows through pxe works smoothly for me. But downloading images(especially windows) is a headache. Let alone the time, bandwith usage is horrible. And p2p tech comes to my mind. But I have no clue how it works or where to start. Anyone knows how to setup p2p local network, and applies that on image transmission? Any advice, tutorials or experiences will be great. Thanks in advance.

    Read the article

  • How to Get All the Windows 8 Editions on One Install Disk

    - by Taylor Gibb
    There are a lot of different versions of Windows, but you probably didn’t know that short of the Enterprise edition, the disc or image that you own contains all versions for that architecture. Read on to see how we can use them to make a universal Windows 8 install disc. Things You Will Need A x86 Version of Windows 8 A x64 Version of Windows 8 A x86 Version of Windows 8 Enterprise A x64 Version of Windows 8 Enterprise A Windows 8 PC Note: While we will use all the images above you don’t really need the Enterprise Edition. You could always leave out parts of the tutorial if you know what you are doing, if you are not comfortable with that and still want to follow through you could always grab the Enterprise evaluation images that are available for free to the public, on MSDN. Getting Started To get started you will need to Download the Windows 8 ADK from Microsoft. Once downloaded go ahead and install it, you will only need the Deployment tools so be sure to uncheck the rest of the options. Lastly you will also need to create the following folder structure on the root of your C:\ drive to make things a bit easier. C:\Windows8Root C:\Windows8Root\x86 C:\Windows8Root\x64 C:\Windows8Root\Enterprisex86 C:\Windows8Root\Enterprisex64 C:\Windows8Root\Temp C:\Windows8Root\Final OK lets get started. Making The Image The first thing we need to do is create a base image, so mount the x86 version of Windows 8 and copy its files to: C:\Windows8Root\Final Now move the install.wim file from: C:\Windows8Root\Final\sources To: C:\Windows8Root\x86 Next go ahead and copy the install.wim file from the other 3 images, Windows 8 x64, Windows 8 Enterprise x86 and Windows 8 Enterprise x64 to the respective folders in Windows8Root, the install.wim file can be located at: D:\sources\install.wim Note: The above assumes that the images are always mounted at drive D. Remember that each install.wim is different so don’t copy them to the wrong directories or the rest of the tutorial wont work. Next switch to the Metro Start Screen and open the Deployment and Imaging Tools Environment. Note: If you are not a local administrator on your PC, you will need to right-click on it and choose to run it as an administrator. Now run the following commands: Dism /Export-Image /SourceImageFile:c:\Windows8Root\x86\install.wim /SourceIndex:2 /DestinationImageFile:c:\Windows8Root\Final\sources\install.wim /DestinationName:”Windows 8″ /compress:maximum Dism /Export-Image /SourceImageFile:c:\Windows8Root\x86\install.wim /SourceIndex:1 /DestinationImageFile:c:\Windows8Root\Final\sources\install.wim /DestinationName:”Windows 8 Pro” /compress:maximum Dism /Export-Image /SourceImageFile:c:\Windows8Root\x86\install.wim /SourceIndex:1 /DestinationImageFile:c:\Windows8Root\Final\sources\install.wim /DestinationName:”Windows 8 Pro with Media Center” /compress:maximum Dism /Export-Image /SourceImageFile:c:\Windows8Root\Enterprisex86\install.wim /SourceIndex:1 /DestinationImageFile:c:\Windows8Root\Final\sources\install.wim /DestinationName:”Windows 8 Enterprise” /compress:maximum Dism /Export-Image /SourceImageFile:c:\Windows8Root\x64\install.wim /SourceIndex:2 /DestinationImageFile:c:\Windows8Root\Final\sources\install.wim /DestinationName:”Windows 8″ /compress:maximum Dism /Export-Image /SourceImageFile:c:\Windows8Root\x64\install.wim /SourceIndex:1 /DestinationImageFile:c:\Windows8Root\Final\sources\install.wim /DestinationName:”Windows 8 Pro” /compress:maximum Dism /Export-Image /SourceImageFile:c:\Windows8Root\x64\install.wim /SourceIndex:1 /DestinationImageFile:c:\Windows8Root\Final\sources\install.wim /DestinationName:”Windows 8 Pro with Media Center” /compress:maximum Dism /Export-Image /SourceImageFile:c:\Windows8Root\Enterprisex64\install.wim /SourceIndex:1 /DestinationImageFile:c:\Windows8Root\Final\sources\install.wim /DestinationName:”Windows 8 Enterprise” /compress:maximum Next navigate to: C:\Windows8Root\sources\ And create a new text file. You will need to call it: EI.cfg Then edit it to look like the following: The last thing we need to do is work some magic to get Windows Media Center added to the WMC editions of Windows 8. For that I have written a little script to make it easier for everybody, you can grab it here. Once you have downloaded it extract it. In order to use it right-click in the bottom left hand corner of the screen, and open an elevated command prompt. Then go ahead and paste the following into the command prompt window. powershell.exe -ExecutionPolicy Unrestricted -File C:\Users\Taylor\Documents\HTGWindows8Converter.ps1 Note: You will need to replace the path to the script, another thing to note is that if the path you replace it with has spaces you will need to enclose the path in quotes. The script should kick off straight away and has some progress bars you can watch while it does its thing. Half way through another Window will pop open, which will start creating your final ISO image. When its complete, close the command prompt and you should have an ISO image on the root of your C drive called: HTGWindows8.iso That’s all there is to it. 7 Ways To Free Up Hard Disk Space On Windows HTG Explains: How System Restore Works in Windows HTG Explains: How Antivirus Software Works

    Read the article

  • How can I select the pixels from an image in opencv?

    - by ajith
    This is refined version of my previous question. Actually I want to do following operation... summation for all k|(i,j)?wk [(Ii-µk)*(Ij-µk)], where wk is a 3X3 window, µk is the mean of wk, Ii & Ij are the intensities of the image at i and j. I dont know how to select Ii & Ij separately from an image which is 2 dimensional[Iij]...or does the equation mean anything else?

    Read the article

  • How to scale JPEG image down so that text is clear as possible?

    - by Juha Syrjälä
    I have some JPEG images that I need scale down to about 80% of original size. Original image dimension are about 700px × 1000px. Images contain some computer generated text and possibly some graphics (similar to what you would find in corporate word documents). How to scale image so that the text is as legible as possible? Currently we are scaling the imaeg down using bicubic interpolation, but that makes the text blurry and foggy.

    Read the article

  • Java SWT - placing image buttons on the image background

    - by foma
    I am trying to put buttons with images(gif) on the background which has already been set as an image (shell.setBackgroundImage(image)) and I can't figure out how to remove transparent border around buttons with images. I would be grateful if somebody could give me some tip about this issue. Here is my code: import org.eclipse.swt.widgets.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.*; import org.eclipse.swt.graphics.*; public class Main_page { public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); Image image = new Image(display, "bg.gif"); shell.setBackgroundImage(image); shell.setBackgroundMode(SWT.INHERIT_DEFAULT); shell.setFullScreen(true); Button button = new Button(shell, SWT.PUSH); button.setImage(new Image(display, "button.gif")); RowLayout Layout = new RowLayout(); shell.setLayout(Layout); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } } Sorceror, thanks for your answer I will definitely look into this article. Maybe I will find my way. So far I have improved my code a little bit. Firstly, I managed to get rid of the gray background noise. Secondly, I finally succeeded in creating the button as I had seen it in the first place. Yet, another obstacle has arisen. When I removed image(button) transparent border it turned out that the button change its mode(from push button to check box). The problem is that I came so close to the thing I was looking for and now I am a little puzzled. If you have some time please give a glance at my code. Here is the code, if you launch it you will see what the problem is(hope you didn't have problems downloading images): import org.eclipse.swt.widgets.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.*; import org.eclipse.swt.graphics.*; public class Main_page { public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); Image image = new Image(display, "bg.gif"); // Launch on a screen 1280x1024 shell.setBackgroundImage(image); shell.setBackgroundMode(SWT.TRANSPARENT); shell.setFullScreen(true); GridLayout gridLayout = new GridLayout(); gridLayout.marginTop = 200; gridLayout.marginLeft = 20; shell.setLayout(gridLayout); // If you replace SWT.PUSH with SWT.COLOR_TITLE_INACTIVE_BACKGROUND // you will see what I am looking for, despite nasty check box Button button = new Button(shell, SWT.PUSH); button.setImage(new Image(display, "moneyfast.gif")); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); }

    Read the article

  • Downloading image from Picasa Web Albums loses metadata

    - by Jarrod
    I have several photos on my Picasa Web Albums account. I have added captions, tags and location information to many of them through the PWA web interface. I assumed that PWA was saving this information in an IPTC, or some other metadata tag inside the image, but whenever I go to 'Download Photo' (on a single image), the resulting image, when saved to my computer, has no tags whatsoever. Does anybody know why this is the case? Does PWA require Picasa to be installed to preserve this information?

    Read the article

  • Simple Image Capture Tool for Mac OS X that uses FireWire

    - by Justin Dearing
    I have Leopard (Mac OS X 10.5) on a G4 Powerbook and a camcorder with a firewire device. It doesn't have iMovie, which is now part of the separate iLife Suite and requires an Intel Mac. Anyway, Image Capture does not recognize the firewire video feed as an image capture device. What software would give me the simplest "capture this frame from live firewire video feed to image" functionality.

    Read the article

  • Get image pixels of prescribed color

    - by ohadsc
    Hi, I have an image (PNG or JPG) inside which there is at least one pixel of a certain RGB color I know in advance I want to find the pixel(s) of that color For example, I may have image.jpg inside which I know some pixel has the RGB value 255,100,200. I want a program that will give me the list of pixels (if any) of that color in the image Anyone know of a tool to help me with that ? Thanks !

    Read the article

  • Checksum Errors From Hard Disk

    - by Ademos
    After running GSmartControl, I received three checksum errors on my storage hard disk. Error in Attribute Data structure: checksum error Error in Attribute Thresholds structure: checksum error Error in ATA Error Log structure: checksum error Does this indicate a hard disk failure? Because, this is the THIRD TIME I have replaced the same hard disk. (after seeing this error) The hard disk is a Western Digital Caviar Green. (2 TB)

    Read the article

  • Simplest way to render image over top of another with another image used as mask in OpenGL?

    - by Adam Naylor
    The effect I'm looking for is to have a single large background image that is always visible (at full alpha) and then show a second image (what I call a light map or specular map) that is partially shown over the top based on a third image (which is effectively a mask). The effect is similar to this effect except instead of simply darkening or lightening the background image using the third image it needs to mask the second without effecting the first at all. The third image is the only one that moves therefore hard baking the third images alpha into the second image isn't an option. If my explanation isn't clear I'll provide visual examples when I have more time. I'd prefer not to go down a shader route as I haven't taught myself this area yet so unless I have too I'd rather try to achieve this with simple alpha blending. Happy to use a shader approach. Cheers. Additional These third images are obviously light sources being cast onto the first image showing the specular information from the second image to simulate the light 'shining' off the objects in the first image. The solution I implement will need to allow two light sources to potentially overlap so my current thoughts are that the alpha values of the two images will need to be combined (Added?) to produce a final image which masks the second image? Don't worry about things like coloured lights. For this technique the lights are all considered white.

    Read the article

  • Split (parts of) image into several smaller (same size) pieces non-manually

    - by hlovdal
    If I have an image with a table containing several rows, say like the periodic table: Are there any tool I can use to split this into one smaller image with the H He row, another image for the Li Be ... Ne row, etc? The tool does not have to detect the row borders by itself, specifying a start offset + row height in pixels is ok. Manually selecting and cutting/copying in gimp is not an option, I have way to many rows to process.

    Read the article

  • How can I increase my disk space when Ubuntu is installed alongside with Windows?

    - by Matthew
    Some time ago i reinstalled windows, formating and deleting every partition. I then made 3 partitions: One only for Windows OS (about 25GB) One for Ubuntu OS (about 25GB, if i remember corectly 10GB for swap memory and 15GB as an ext4 partition) (not sure if it was that, hope I am not wrong) and like 200GB for all the other stuff. Recently I got a message that i am running out of disk space. My question is: is there a way to resize the 200GB partition and add more space for the Ubuntu partition?

    Read the article

  • Video/Image processing on Apple iPhone4 [closed]

    - by goldenmean
    Hello, I know apple iPhone4 support H.264 and MPEG-4 as the supported video codecs, and JPEG,M-JPEG as image codecs. I was looking to get some information on Apple iPhone4 Video, Image Codec and Processing Chips/SoC parts. 1] Does anyone know, Which vendor provides the SoC's to enable this image / video compression and processing solutions in iPhone4. 2] Are the video/image codec solutions - 'Software codecs' on a specialized dsp-core/processor or hard wired as in a FPGA/ASIC solution. Any pointers would be useful. thank you. -AD.

    Read the article

  • choosing an image locally from http url and serving that image without a server round trip

    - by serverman
    Hi folks I am a complete novice to Flash (never created anything in flash). I am quite familiar with web applications (J2EE based) and have a reasonable expertise in Javascript. Here is my requirement. I want the user to select (via an html form) an image. Normally in the post, this image would be sent to server and may be stored there to be served later. I do not want that. I want to store this image locally and then serve it via HTTP to the user. So, the flow is: 1. Go to the "select image url":mywebsite.com/selectImage Browse the image and select the image This would transfer control locally to some code running on the client (Javascript or flash), which would then store the image locally at some place on the client machine. Go to the "show image url": mywebsite.com/showImage This would eventually result in some client code running on the browser that retrieves the image and renders it (without any server round trips.) I considered the following options: Use HTML5 local storage. Since I am a complete novice to flash, I looked into this. I found that it is fairly straightforward to store and retrieve images in javascript (only strings are allowed but I am hoping storing base64 encoded strings would work at least for small images). However, how do I serve the image via http url that points to my server without a server round trip? I saw the interesting article at http://hacks.mozilla.org/category/fileapi/ but that would work only in firefox and I need to work on all latest browsers (at least the ones supporting HTML5 local storage) Use flash SharedObjects. OK, this would have been good - the only thing is I am not sure where to start. Snippets of actionscripts to do this are scattered everywhere but I do not know how to use those scripts in an actual html page:) I do not need to create any movies or anything - just need to store an image and serve it locally. If I go this route, I would also use it to store other "strings" locally. If you suggest this, please give me the exact steps (could be pointers to other web sites) on how to do this. I would like to avoid paying for any flash development environment software ideally:) Thank you!

    Read the article

  • How do I easily repair a single unreadable block on a Linux disk?

    - by Nelson
    My Linux system has started throwing SMART errors in the syslog. I tracked it down and believe the problem is a single block on the disk. How do I go about easily getting the disk to reallocate that one block? I'd like to know what file got destroyed in the process. (I'm aware that if one block fails on a disk others are likely to follow; I have a good ongoing backup and just want to try to keep this disk working.) Searching the web leads to the Bad block HOWTO, which describes a manual process on an unmounted disk. It seems complicated and error-prone. Is there a tool to automate this process in Linux? My only other option is the manufacturer's diagnostic tool, but I presume that'll clobber the bad block without any reporting on what got destroyed. Worst case, it might be filesystem metadata. The disk in question is the primary system partition. Using ext3fs and LVM. Here's the error log from syslog and the relevant bit from smartctl. smartd[5226]: Device: /dev/hda, 1 Currently unreadable (pending) sectors Error 1 occurred at disk power-on lifetime: 17449 hours (727 days + 1 hours) ... Error: UNC at LBA = 0x00d39eee = 13868782 There's a full smartctl dump on pastebin.

    Read the article

  • How to write PIL image filter for plain pgm format?

    - by Juha
    How can I write a filter for python imaging library for pgm plain ascii format (P2). Problem here is that basic PIL filter assumes constant number of bytes per pixel. My goal is to open feep.pgm with Image.open(). See http://netpbm.sourceforge.net/doc/pgm.html or below. Alternative solution is that I find other well documented ascii grayscale format that is supported by PIL and all major graphics programs. Any suggestions? br, Juha feep.pgm: P2 # feep.pgm 24 7 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 3 3 3 0 0 7 7 7 7 0 0 11 11 11 11 0 0 15 15 15 15 0 0 3 0 0 0 0 0 7 0 0 0 0 0 11 0 0 0 0 0 15 0 0 15 0 0 3 3 3 0 0 0 7 7 7 0 0 0 11 11 11 0 0 0 15 15 15 15 0 0 3 0 0 0 0 0 7 0 0 0 0 0 11 0 0 0 0 0 15 0 0 0 0 0 3 0 0 0 0 0 7 7 7 7 0 0 11 11 11 11 0 0 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 edit: Thanks for the answer, I works... but I need a solution that uses Image.open(). Most of python programs out there use PIL for graphics manipulation (google: python image open). Thus, I need to be able to register a filter to PIL. Then, I can use any software that uses PIL. I now think mostly scipy, pylab, etc. dependent programs.

    Read the article

  • Linux usd disk just create sg device

    - by MTilsted
    I have a Corsair R60 ssd disk which is a disk with both sata and usb connectors. But the usb thing seems to be a bit non-standard, or maybe its just my fedora linux. When I insert the disk using a usb cabel to a running Fedora 14 linux system, a device called /dev/sg3 is added but that is all. No new /dev/sd* device is created so I can't mount the disk. If I look at cat /proc/scsi/sg/device_strs I get ATA Hitachi HTS54321 FB2O HL-DT-ST DVDRAM GSA-T50N RP05 Seagate Desktop 0130 Corsair CSSD-R60GB2 So the disk is there. (The last entry) but my linux will for some reason not see it as a usb hard disk. When I insert other usb disks they work fine. It is only this specific disk which causes problems. I have tried on 3 different computers with the same result. A hint to the problem may be that if I add the disk to a windows system(With usb) the disk is called "A fixed disk" and not a portable disk as expected. The disk works fine with linux If i connect it with the sata cabel, but I would really like to have it working with usb too. (To mount it on computers without sata).

    Read the article

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