Search Results

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

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

  • 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

  • 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

  • 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

  • PowerISO for Mac can't convert .img

    - by None
    I have a bootable .img file that I want to convert to a bootable .iso file. I downloaded poweriso for Mac and used this command: poweriso convert MyOS.img -o MyOS.iso -ot iso which returned this output: PowerISO Copyright(C) 2004-2008 PowerISO Computing, Inc Type poweriso -? for help MyOS.img: The file format is invalid or unsupported. I thought PowerISO could convert .img to .iso. Was I incorrect, or did I use the wrong commands or something like that?

    Read the article

  • Ubuntu apt-get install linux-image

    - by Karl Kloppenborg
    I'd like someone to enlighten me as to what exactly goes on with aptitude when I want a kernel. As we all know, there's pretty much the following kernel option: linux-image-generic linux-image-server linux-image-virtual This morning I did an install and it had linux-image-generic on it, so I ran the following: apt-get -y remove linux-image-* This removed all my kernels as expected, I followed suit with running: apt-get install linux-image-virtual Says I've installed linux-image-server!? Am I missing something here, because I checked twice and it did it twice, however if I manually select a kernel (in my instance I used: linux-image-2.6.35-30-virtual) it will install linux-image-virtual. This seems rather strange to me? Details: Running Ubuntu 9.10 Am I missing something? :)

    Read the article

  • Silverlight Image Loading Question

    - by Matt
    I'm playing around with Silverlight Images and a listbox. Here's the scenario. Using WCF I grab some images out of my database and, using a custom class, add items to a listbox. It's working great right now. The images load and appear in the listbox, just like I want them to. I want to refine and improve my control just a little more so here's what I've done. <ListBox x:Name="lbMedia" Background="Transparent" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Auto"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <c:WrapPanel></c:WrapPanel> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate> <im:MediaManagerItem></im:MediaManagerItem> </DataTemplate> </ItemsControl.ItemTemplate> </ListBox> Just a simple listbox. The datatemplate is a custom control and literally it contains a contentpresenter, nothing more. Now the class that I use as the ItemSource has a Source property. Here's what it looks like. private UIElement _LoadingSource; private UIElement _Source; public UIElement Source { get { if( _Source == null ) { LoadMedia(); return new LoadingElement(); } return _Source; } set { if( !( value is Image ) && !( value is MediaElement ) ) throw new Exception( "Media Source must be an Image or MediaElement" ); _Source = value; NotifyPropertyChanged( "Source" ); } } Essentially, on the get I check if the image/video has been loaded from the server. If it hasn't I return a loading control, then I proceed to load my image. Here's the code for my LoadMedia method. private void LoadMedia() { if( _Media != null && _Media.MediaId > 0 ) { //load the media BackgroundWorker mediaLoader = new BackgroundWorker(); mediaLoader.DoWork += mediaLoader_DoWork; mediaLoader.RunWorkerCompleted += mediaLoader_RunWorkerCompleted; mediaLoader.RunWorkerAsync(); } } void mediaLoader_RunWorkerCompleted( object sender, RunWorkerCompletedEventArgs e ) { if(_LoadingSource != null) Source = _LoadingSource; } void mediaLoader_DoWork( object sender, DoWorkEventArgs e ) { string url = App.siteUrl + "download.ashx?MediaId=" + _Media.MediaId; SmartDispatcher.BeginInvoke( () => { Image img = new Image(); img.Source = new BitmapImage( new Uri( url, UriKind.Absolute ) ); _LoadingSource = img; } ); } So as the code goes, I create a new image element, and set the Uri. The images that I'm downloading take about 2-5 seconds to download. Now for the problem / fine tuning. Right now my code will check if the source is null and if it is, return a loading element, and run the background worker to get the image. Once the background worker finishes, set the source to the new downloaded image. I want to be able to set the Source property AFTER the image has fully downloaded. Right now my loading element appears for a brief second, then there's nothing for 2-5 seconds until the image finishes downloading. I want the loading elements to stick around until the image is completely ready but I'm having troubles doing this. I've tried adding a a listener to the ImageOpened event and update the Source property then, but it doesn't work. Thanks in advance.

    Read the article

  • Scaling an image using the mouse in C#

    - by Gaax
    Hey guys... I'm trying to use the position of the mouse to calculate the scaling factor for scaling an image. Basically, the further you get away from the center of the image, the bigger it gets; and the closer to the center you get, the smaller it gets. I have some code so far but it's acting really strange and I have absolutely no more ideas. First I'll let you know, one thing I was trying to do is average out 5 distances to get a more smooth resize animation. Here's my code: private void pictureBoxScale_MouseMove(object sender, MouseEventArgs e) { if (rotateScaleMode && isDraggingToScale) { // For Scaling int sourceWidth = pictureBox1.Image.Width; int sourceHeight = pictureBox1.Image.Height; float dCurrCent = 0; // distance between the current mouse pos and the center of the image float dPrevCent = 0; // distance between the previous mouse pos and the center of the image System.Drawing.Point imgCenter = new System.Drawing.Point(); imgCenter.X = pictureBox1.Location.X + (sourceWidth / 2); imgCenter.Y = pictureBox1.Location.Y + (sourceHeight / 2); // Calculating the distance between the current mouse location and the center of the image dCurrCent = (float)Math.Sqrt(Math.Pow(e.X - imgCenter.X, 2) + Math.Pow(e.Y - imgCenter.Y, 2)); // Calculating the distance between the previous mouse location and the center of the image dPrevCent = (float)Math.Sqrt(Math.Pow(prevMouseLoc.X - imgCenter.X, 2) + Math.Pow(prevMouseLoc.Y - imgCenter.Y, 2)); if (smoothScaleCount < 5) { dCurrCentSmooth[smoothScaleCount] = dCurrCent; dPrevCentSmooth[smoothScaleCount] = dPrevCent; } if (smoothScaleCount == 4) { float currCentSum = 0; float prevCentSum = 0; for (int i = 0; i < 4; i++) { currCentSum += dCurrCentSmooth[i]; } for (int i = 0; i < 4; i++) { prevCentSum += dPrevCentSmooth[i]; } float scaleAvg = (currCentSum / 5) / (prevCentSum / 5); int destWidth = (int)(sourceWidth * scaleAvg); int destHeight = (int)(sourceHeight * scaleAvg); // If statement is for limiting the size of the image if (destWidth > (currentRotatedImage.Width / 2) && destWidth < (currentRotatedImage.Width * 3) && destHeight > (currentRotatedImage.Height / 2) && destWidth < (currentRotatedImage.Width * 3)) { AForge.Imaging.Filters.ResizeBilinear resizeFilter = new AForge.Imaging.Filters.ResizeBilinear(destWidth, destHeight); pictureBox1.Image = resizeFilter.Apply((Bitmap)currentRotatedImage); pictureBox1.Size = pictureBox1.Image.Size; pictureBox1.Refresh(); } smoothScaleCount = -1; } prevMouseLoc = e.Location; currentScaledImage = pictureBox1.Image; smoothScaleCount++; } }

    Read the article

  • Using PHP GD to create image form text with different fonts.

    - by Meredith
    I have been using this simple script to generate images from text: <?php header('Content-type: image/png'); $color = RgbfromHex($_GET['color']); $text = urldecode($_GET['text']); $font = 'arial.ttf'; $im = imagecreatetruecolor(400, 30); $bg_color = imagecolorallocate($im, 255, 255, 255); $font_color = imagecolorallocate($im, $color[0], $color[1], $color[2]); imagefilledrectangle($im, 0, 0, 399, 29, $bg_color); imagettftext($im, 20, 0, 10, 20, $font_color, $font, $text); imagepng($im); imagedestroy($im); function RgbfromHex($hexValue) { if(strlen(trim($hexValue))==6) { return array( hexdec(substr($hexValue,0,2)), // R hexdec(substr($hexValue,2,4)), // G hexdec(substr($hexValue,4,6)) // B ); } else return array(0, 0, 0); } ?> I call the script with file.php?text=testing script&color=000000 Now I'd like to know how could I generate text with normal and bold fonts mixed in the same image, something like file.php?text=testing <b>script</b>&color=000000

    Read the article

  • Why is conversion from UTF-8 to ISO-8859-1 not the same in Windows and Linux?

    - by user1895307
    I have the following in code to convert from UTF-8 to ISO-8859-1 in a jar file and when I execute this jar in Windows I get one result and in CentOS I get another. Might anyone know why? public static void main(String[] args) { try { String x = "Ä, ä, É, é, Ö, ö, Ãœ, ü, ß, «, »"; Charset utf8charset = Charset.forName("UTF-8"); Charset iso88591charset = Charset.forName("ISO-8859-1"); ByteBuffer inputBuffer = ByteBuffer.wrap(x.getBytes()); CharBuffer data = utf8charset.decode(inputBuffer); ByteBuffer outputBuffer = iso88591charset.encode(data); byte[] outputData = outputBuffer.array(); String z = new String(outputData); System.out.println(z); } catch(Exception e) { System.out.println(e.getMessage()); } } In Windows, java -jar test.jar test.txt creates a file containing: Ä, ä, É, é, Ö, ö, Ü, ü, ß, «, » but in CentOS I get: ??, ä, ??, é, ??, ö, ??, ü, ??, «, » Help please!

    Read the article

  • How would I write a virtual CD/DVD burner that would allow programs that burn to write to ISO?

    - by Ryan
    I want to write an app that will allow a program like iTunes which normally will recognize a DVD/CD burner to recognize a virtual one and then write to it creating an ISO. I would guess to use C/C++... can someone point me in the right direction as to how this can be done? Basically it would be a virtual CD/DVD burner that would output an ISO file to the hard drive. I want to do this for both the usefulness of it as well as the challenge, just need an idea of how to approach it, have no idea how to write virtual hardware.

    Read the article

  • Boot failure on installation from a burned iso image

    - by jdamae
    I'm encountering boot failure while trying to install a Linux distro from a CD. I'm using an older PC; here are its specs: HP Pavilion a255c 2.66GHz CPU, 512MB RAM with a BIOS revision of 6/30/2003 I reclaimed an older drive (Seagate ST340810A) that seems to be working, as it's recognized in the BIOS (auto-detected). So this is not the original HDD, but a replacement. I downloaded a mini.iso of Ubuntu 10.10 that I want to install, and burned the image to a CD for install. My boot sequence is: First Boot Device [CDROM]. I disabled devices 2-4 so I can just force it to read first from the CD-ROM. This old PC also has a separate CD writer which is a Sec.Slave. The Sec.Master is the Toshiba DVD/ROM DSM-171 drive where I placed the burned Linux CD. With these settings I cannot get it to boot. I get the message "DISK BOOT FAILURE, INSERT SYSTEM DISK AND PRESS ENTER" when I start the pc with the cd (burned iso image). Would I be able to boot off a usb flash drive? Would that work?

    Read the article

  • Hidden files in Nautilus after extracting ISO

    - by Luis Alvarado
    I need to first point to the image below to explain a bit about what I find weird here: I extracted the informacion from an ISO I from Nautilus I could only see two folders but from the terminal I can see the rest of the files and folders. This folders do not have the . character in from of them to hide them from plain sight. When I try to "Show hidden files" in Nautilus, Nautilus closes itself. It does not show the hidden folders or files. Somehow they are hidden without using the normal dot in the beginning of the name. The have my user permission but no way of seeing them from Nautilus. I can interact with them but the fact that they appear hidden when I can see them inside the ISO and after extracting them they disappear is what confuses me. What permission or setting makes this folders appear hidden and does not let Nautilus show them and like I said before, trying to show them with the "Show hidden files" option crashes Nautilus and exits it. Forcing me to have to open Nautilus again from the Launcher.

    Read the article

  • Netbook Remix 10.04 to 10.10 upgrade using alternate iso

    - by Suman Subramonian
    I'm using Netbook Remix 10.04 now. I'm having the 10.10 alternate iso with me. If I use that iso to upgrade, will I lose my netbook version? I've seen in some forums that the upgrade resulted in a change from netbook version to desktop version. Updated on 15/12/2010 I upgraded the OS from 10.04 to 10.10. But I'm getting an error like this after restart: modprobe: FATAL: Could not load /lib/modules/2.6.35-22-generic/modules.dep: No such file or directory I searched in the forums and got a solution like this: Open Terminal gksudo gedit /etc/initramfs-tools/initramfs.conf change the line MODULES=most to MODULES=dep Then use Synaptic (SystemAdministrationSynaptic Package Manager) to reinstall initramfs-tools. I'll be definitely trying this later. After that when the system tries to login, my screen starts flashing with just the ubuntu netbook desktop wallpaper on the screen. No other options will be available. It will be flashing continuosly. If I press the power button then one window comes up with options like Shut down, Restart, Hibernate etc. And the screen won't stop flashing either. I've uploaded a 1 min video. Please go through it as it will give you a clear idea of the error which I'm facing now Video Link Here

    Read the article

  • ISO 12207 - testing being only validation activity? [closed]

    - by user970696
    Possible Duplicate: How come verification does not include actual testing? ISO norm 12207 states that testing is only validation activity, while all static inspections are verification (that requirement, code.. is complete, correct..). I did found some articles saying its not correct but you know, it is not "official". I would like to understand because there are two different concepts (in books & articles): 1) Verification is all testing except for UAT (because only user can really validate the use). E.g. here OR 2) Verification is everything but testing. All testing is validation. E.g. here Definitions are mostly the same, as Sommerville's: The aim of verification is to check that the software meets its stated functional and non-functional requirements. Validation, however, is a more general process. The aim of validation is to ensure that the software meets the customer’s expectations. It goes beyond simply checking conformance with the specification to demonstrating that the software does what the customer expects it to do It is really bugging me because I tend to agree that functional testing done on a product (SIT) is still verification because I just follow the requirements. But ISO does not agree..

    Read the article

  • Detecting when error image in PictureBox is used

    - by DMan
    I found this on Google, click here, which someone asked a similar question, receiving a response that they should check if their file exists. However, I'm loading images from web links, in which it displays an error image if A)The picture is not found or B)If, like in image hosting services like Photobucket, displays the 'Bandwidth exceeded' image. Is there a way to detect if either an error image is showing or if a image is invalid?

    Read the article

  • Image rotation algorithm

    - by Stefano Driussi
    I'm looking for an algorithm that rotates an image by some degrees (input). public Image rotateImage(Image image, int degrees) (Image instances could be replaced with int[] containing each pixel RGB values, My problem is that i need to implement it for a JavaME MIDP 2.0 project so i must use code runnable on JVM prior to version 1.5 Can anyone help me out with this ? EDIT: I forgot to mention that i don't have SVG APIs available and that i need a method to rotate by arbitrary degree other than 90 - 180- 270 Also, no java.awt.* packages are available on MIDP 2.0

    Read the article

  • Emulating Windows Photo Viewer image dragging in c#

    - by murasaki5
    Hi, i'm trying to emulate how image is being dragged inside the windows photo viewer when it is large. The problem is, i don't how to drag the image while keeping it intact in the form's edges. If you're observing windows photo viewer, when you drag the image downward for instance the image moves and stops when the top end of the image is visible, but in my app, it continues to move since i don't know how to check when to stop it. Any idea please?

    Read the article

  • Loading .png image from array of uint8_t into OpenGL ES texture

    - by unknownthreat
    Normally, when we want to load a texture for OpenGL ES with .png, we simply add the .png images into XCode. The .png files will be altered for optimization by XCode and these altered png files can loaded into OpenGL ES texture during the runtime. However, what I am trying to do is quite different. I am trying to load a .png file that is not from the prebuilt/compile. The png file will be transmitted externally from UDP, and it will be in the form of array of bytes. I am very sure that the png is transferred correctly, but when it comes to displaying the png image in the form of the OpenGL ES texture, the image somehow shows incorrectly. The colors that are being sent are presented but the positions are somehow very incorrect. However, the position of the colors still retain some aspects of the original position. Here: The left image shows the original .png, while the right shows the png being displayed on iPhone using OpenGL ES Texture. It looks more like the png data is not being decoded or incorrectly processed. Below is OpenGL ES code for turning the image into texture: - (void) setTextureFromImageByte: (uint8_t*)imageByte{ if (self = [super init]){ NSData* imageData = [[NSData alloc] initWithBytes: imageByte length: imageLength]; UIImage* img = [[UIImage alloc] initWithData: imageData]; CGImageRef image = img.CGImage; int width = 512; int height = 512; if (image){ int tempWidth = (int)width, tempHeight = (int)height; if ((tempWidth & (tempWidth - 1)) != 0 ){ NSLog(@"CAUTION! width is not power of 2. width == %d", tempWidth); }else if ((tempHeight & (tempHeight - 1)) != 0 ){ NSLog(@"CAUTION! height is not power of 2. height == %d", tempHeight); }else{ void *spriteData = calloc(width * 4, height * 4); CGContextRef spriteContext = CGBitmapContextCreate(spriteData, width, height, 8, width*4, CGImageGetColorSpace(image), kCGImageAlphaPremultipliedLast); CGContextDrawImage(spriteContext, CGRectMake(0.0, 0.0, width, height), image); CGContextRelease(spriteContext); glBindTexture(GL_TEXTURE_2D, 1); glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 320, 435, GL_RGBA, GL_UNSIGNED_BYTE, spriteData); free(spriteData); } }else NSLog(@"ERROR: Image not loaded..."); [img release]; [imageData release]; } } So does anyone knows how to deal with this? Is it because of iPhone only accepts altered png from XCode? What can we do in this case in order to make the png image be able to display correctly?

    Read the article

  • jQuery Actual image diamension

    - by Mithun
    I have a 1024x768 image <span class="frame"> <img alt="Image" title="Image" src="http://localhost/zapav/site/assets/questions/D41120CA-7164-11DF-A79E-F4CE462E9D80_Green_Sea_Turtle.jpg"> </span> and the below CSS sets the image width to .frame img{ width:425px; } And the jQuery code $('.uploaded_image img').attr("width"); returns 425 How can i retrieve the actual width of the image 1024 in JavaScipt?

    Read the article

  • Cannot use "image.save" on django

    - by zjm1126
    My error is: IOError at /mytest/photo/upload/ [Errno 2] No such file or directory: u'/mytest/photo/upload/2.png' And my view is: UPLOAD_URL = '/mytest/photo/upload/' def upload(request): buf = request.FILES.get('photo', None) print buf if buf: #data = buf.read() #f = StringIO.StringIO(data) image = Image.open(buf) #image = image.convert('RGB') name = '%s%s' % (UPLOAD_URL, buf.name) image.save(file(name, 'wb'), 'PNG') return HttpResponse('ok') return HttpResponse('no') And my urls.py is: urlpatterns = patterns('mytest.views', url(r'^photo/upload/$','upload',name="") ) How can I fix this?

    Read the article

  • Image panning in sencha touch 2

    - by MattD
    I'm trying to have show a large image that the user can pan around (so scroll vertically & horizontally). But I can't get the image to scroll. This is what I have: Ext.define('myapp.view.image.Floorplan', { extend: 'Ext.Container', requires: 'Ext.Img', xtype: 'floorplan', config: { title: 'Floorplan', iconCls: 'locate', items: [ { xtype: 'image', scrollable: true, src: './resources/images/floorplan.png', height: 1570, width: 1047 } ] } }); How can I make the image scrollable? Thanks Matt

    Read the article

  • How to specify the image scaling algorithm used by a WPF Image?

    - by mackenir
    Is there a way to specify how an image is scaled up in an Image element with LayoutTransform set to a ScaleTransform with integer values for ScaleX and ScaleY? I want to display the scaled image crisply (ie using 'nearest neighbour' scaling), with no blurring. (Imagine how you would want a bitmap editing program to behave when zooming in). I noticed the protected property VisualBitmapScalingMode on Image, so created a subclass of Image that sets this property to BitmapScalingMode.NearestNeighbor. However, this had no effect.

    Read the article

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