Search Results

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

Page 113/1078 | < Previous Page | 109 110 111 112 113 114 115 116 117 118 119 120  | Next Page >

  • How do I overlay text on an image who's size is to be set?

    - by Mike
    I am trying to make a bar chart using tables, which I have almost accomplished to my liking. The last step I want is text over my image which represents the bar. Here is the code I have thus far for building my little bar charts: $height = 50; //build length $width = 450; $multi = $brewAvg / 5; $width = $width * $multi; print " <tr > <td > $count. <a href=\"$breweryURL\"> $brewR</a> </td> <td > <img src=\"blueBar.png\" width=\"$width\" height=\"$height\"> </td> </tr> "; And this produces something like this: You can see in the code how I simply calculate the length of the bar based on a breweries rating. What I want to do next is have the rating number show on top of each breweries on the left hand side. How would I go about accomplishing this? Update: I tried a tutorial I read here: http://www.kavoir.com/2009/02/css-text-over-image.html and I changed my code to this: print "<div class=\"overlay\"> "; print " <tr valign=\"middle\" > <td > $count. <a href=\"$breweryURL\"> $brewR</a> </td> <td > <img src=\"blueBar.png\" width=\"$width\" height=\"$height\"> </td> </tr> "; print" <div class=\"text\"> <p> $brewAvg </p> </div> </div> "; And my css I added was this: <style> .overlay { position:relative; float:left; /* optional */ } .overlay .text { position:absolute; top:10px; /* in conjunction with left property, decides the text position */ left:10px; width:300px; /* optional, though better have one */ } </style> And it did put any of the value son top of my images. All the text is in a list above all the bars like this:

    Read the article

  • JavaScript - Settting property on Object in Image load function, property not set once outside funct

    - by Sunday Ironfoot
    Sometimes JavaScript doesn't make sense to me, consider the following code that generates a photo mosaic based on x/y tiles. I'm trying to set a .Done property to true once each Mosaic image has been downloaded, but it's always false for some reason, what am I doing wrong? var tileData = []; function generate() { var image = new Image(); image.onload = function() { // Build up the 'tileData' array with tile objects from this Image for (var i = 0; i < tileData.length; i++) { var tile = tileData[i]; var tileImage = new Image(); tileImage.onload = function() { // Do something with this tile Image tile.Done = true; }; tileImage.src = tile.ImageUrl; } }; image.src = 'Penguins.jpg'; tryDisplayMosaic(); } function tryDisplayMosaic() { setTimeout(function() { for (var i = 0; i < tileData.length; i++) { var tile = tileData[i]; if (!tile.Done) { tryDisplayMosaic(); return; } } // If we get here then all the tiles have been downloaded alert('All images downloaded'); }, 2000); } Now for some reason the .Done property on the tile object is always false, even though it is explicitly being set to true inside tileImage.onload = function(). And I can ensure you that this function DOES get called because I've placed an alert() call inside it. Right now it's just stuck inside an infinite loop calling tryDisplayMosaic() constantly. Also if I place a loop just before tryDisplayMosaic() is called, and in that loop I set .Done = true, then .Done property is true and alert('All images downloaded'); will get called.

    Read the article

  • PyQt WebKit CSS background image not showing

    - by Enfors
    I'm making a Twitter client with PyQt, which uses WebKit to draw the tweet list. Now I'm trying to use CSS to set a background image in the WebKit widget - but the image won't show up. This is the relevant part of the CSS: body { background-image: url("gradient2.jpg"); } The file name is correctly spelled, and it is located in the same directory as the Python program, which is also where I start the program from (so the image file should be in PWD). To check if WebKit somehow looks for the image in the wrong directory anyway, I ran my program through strace, which creates a log of all system calls made by the program. And surprisingly, the name of the image does not appear in the log - so it seems as if WebKit doesn't even try to find it. To verify that my CSS is used at all by WebKit, I tried changing it to a solid background color instead of an image: body { background: #CCFFCC; } And that works. So I know that the CSS is used, that's not the problem. Could it be that WebKit refuses to use "ordinary" files in the filesystem, and that I somehow have to create some sort of "resource" file containing my image in Qt Designer?

    Read the article

  • Post-loading : check if an image is in the browser cache

    - by Mathieu
    Short version question : Is there navigator.mozIsLocallyAvailable equivalent function that works on all browsers, or an alternative? Long version :) Hi, Here is my situation : I want to implement an HtmlHelper extension for asp.net MVC that handle image post-loading easily (using jQuery). So i render the page with empty image sources with the source specified in the "alt" attribute. I insert image sources after the "window.onload" event, and it works great. I did something like this : $(window).bind('load', function() { var plImages = $(".postLoad"); plImages.each(function() { $(this).attr("src", $(this).attr("alt")); }); }); The problem is : After the first loading, post-loaded images are cached. But if the page takes 10 seconds to load, the cached post-loaded images will be displayed after this 10 seconds. So i think to specify image sources on the "document.ready" event if the image is cached to display them immediatly. I found this function : navigator.mozIsLocallyAvailable to check if an image is in the cache. Here is what I've done with jquery : //specify cached image sources on dom ready $(document).ready(function() { var plImages = $(".postLoad"); plImages.each(function() { var source = $(this).attr("alt") var disponible = navigator.mozIsLocallyAvailable(source, true); if (disponible) $(this).attr("src", source); }); }); //specify uncached image sources after page loading $(window).bind('load', function() { var plImages = $(".postLoad"); plImages.each(function() { if ($(this).attr("src") == "") $(this).attr("src", $(this).attr("alt")); }); }); It works on Mozilla's DOM but it doesn't works on any other one. I tried navigator.isLocallyAvailable : same result. Is there any alternative?

    Read the article

  • Splitting an image in GWT results in unwanted white space

    - by rancidfishbreath
    I am using GWT 2.03 and am have an image that I want to place partially in an area with a background and partially above a background. I am using a FlexTable to try to accomplish this and have used GIMP to cut the image into two sections. I am trying to load the top part of the image into row 0 and the bottom part of the image into row 1. I set the alignment of the top image to ALIGN_BOTTOM but there is a bit of space at the bottom of cell and so the two parts of the picture don't touch. Here is an image showing what I am talking about. I set the background of the cell to be yellow show where the cell boundaries are. The bottom image and background are rendering correctly. Here is the relevant code snippet: FlexTable table = new FlexTable(); table.setCellSpacing(0); table.setCellPadding(0); table.setBorderWidth(0); FlexCellFormatter formatter = table.getFlexCellFormatter(); table.setWidget(0, 0, topImage); formatter.setStyleName(0, 0, "topImageStyle"); formatter.setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_BOTTOM); table.setWidget(1, 0, bottomImage); formatter.setStyleName(1, 0, "bottomImageStyle"); How can I get rid of that space between my image and the cell boundary?

    Read the article

  • Using max-width = 100% and max-height = 100% on an image, calculate the display width/height

    - by NatalieMac
    I am creating a slideshow for images of various sizes to display centered vertically and horizontally within a canvas area. In my CSS, I set the width and height of the image to 100% so that each image would proportionally fill the canvas. I want the canvas to auto-size itself to fit within the viewer's screensize as the original size of the images is quite large (up to 800 pixels tall). I am using jQuery 1.4, and using the height of the image to calculate the top value for absolute positioning it to the middle of the canvas. I have tried using jQuery to get the .height(), innerHeight(), and outerHeight(), but it always gets the full size of the image. I extracted the DOM element from the jQuery object and tried using .width, .offsetWidth, and .clientWidth, but that too always seems to return the full size of the image. Firebug displays the correct dimensions, so I know there's some way of calculating the actual display height of the image, I just can't figure out what it is. How do you get the actual display height of an image if you've set max-height = 100%? I didn't want to have to calculate and set the height of each image in the js, but if I have to, I will. It just seems like I should be able to set the canvas size and have the images auto-adjust.

    Read the article

  • Play video while downloading into local disk [AIR]

    - by vincentma
    Hello guys, Using NetStream, I can create progressive video player. But can I save the downloaded chunk to my local disk in AIR?? My first idea is that, download part of file into local disk, let NetStream pointing to that file, and then appends the chunks to that file (FileMode.APPEND) periodically. But it does not work and seems that NetStream would 'lock' the file preventing write operation. Any ideas?

    Read the article

  • Move rotating image along Canvas

    - by fatnic
    Hi. I've managed to make an image rotate on my canvas. And I've managed to make an image move along the canvas. My problem now is making it do both. I have got it working but I seems a bit like a hack. I've posted a demo online Here's the code. var cnv = document.getElementById("drawing"); var c = cnv.getContext('2d'); var image = new Image(); image.src = 'images/spaceship.png'; var imgWidth = image.width; var imgHeight = image.height; var i=0; function animate() { c.clearRect(0,0,640,480); c.save(); c.translate(-(imgWidth/2)+i,200); c.rotate(i * Math.PI/180); c.translate(-(imgWidth/2),-(imgHeight/2)); c.drawImage(image, 0, 0); c.restore(); (i==640+imgWidth) ? i=0: i+=2; }; setInterval(animate, 1); I think my problem is I'm not understanding the translate() method properly. Is this the correct way to do it or am I competely way off?

    Read the article

  • Database that consumes less disk space

    - by Hugo Palma
    I'm looking at solutions to store a massive quantity of information consuming the less possible disk space. The information structure is very simple and the queries will also be very simple. I've looked at solutions like Apache Cassandra and relations databases but couldn't find a comparison where disk usage is mentioned. Any ideas on this would be great.

    Read the article

  • css background image is being cut off..

    - by Ronedog
    I have an unordered list and the background image is being cut off when trying to place it next to the text. I'm using jquery to add the class to the anchor tag to display the image, and its working fine, the only problem is the image gets cut off. I've been playing around with the css, but can't seem to figure out how to make the image display properly...it seems like the < li is hiding the image behind it somehow...can I place the image in front of the < li to make it display...or am I missing something else? Can someone help me? Thanks. Here's the HTML: <ul id="nav> <li> <a class="folder_closed">Item 1</a> </li> </ul> Here's the CSS: ul#nav{ margin-left:0; margin-right:0; padding-left:0px; text-indent:15px; } #nav > li{ vertical-align: top; text-align:left; clear: both; margin-left:0px; margin-right:0px; padding-right:0px; padding-left:15px; } .folder_open{ position:relative; background-image: url(../images/maximize.png); background-repeat: no-repeat; background-position: -5px 1px; } .folder_closed{ position:relative; background-image: url(../images/minimize.png); background-repeat: no-repeat; background-position: -5px 1px; }

    Read the article

  • Generated HTML word document not displaying image correctly

    - by spiderdijon
    I'm trying to add an image to a generated html word document that is embedded in a classic ASP page. The code looks something like this: <% Response.ContentType = "application/msword" %> <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word"> ... <v:shape id="_x0000_s1030" type="#_x0000_t75" style='position:absolute; left:0;text-align:left;margin-left:0;margin-top:17.95pt;width:7in;height:116.85pt; z-index:2;mso-position-horizontal:center;mso-position-horizontal-relative:page; mso-position-vertical-relative:page'> <v:imagedata src="http://xxx/image001.gif" o:title="image001"/> <w:wrap anchorx="page" anchory="page"/> <w:anchorlock/> </v:shape><![endif]--><![if !vml]><span style='mso-ignore:vglayout;position: absolute;z-index:0;left:0px;margin-left:0px;margin-top:24px;width:672px; height:156px'><img width=672 height=156 src="http://xxx/image001.gif" v:shapes="_x0000_s1030"></span><![endif]> The image URL is correct and can be viewed through a browser, however when the word document opens, the image has a red x, with the error message: The image cannot be displayed. Your computer may not have enough memory to open the image, or the image may be corrupted. Restart your computer, and then open the file again. If the red x still appears, you may have to delete the image and then insert it again. If i copy the html code and try to open the word document on my local machine, it displays the image correctly. It just doesn't work when retrieving the document from the server. This happens for any images I try to add. Is there another way to add images to html-generated word documents that can be output from an asp page? Thanks.

    Read the article

  • Change an Image while using JCrop

    - by Bathan
    Hi guys! Im working on a new feature in my site and I got stucked really bad. Im using JCrop obviously to crop an Image on my website. The new feature that I've been asked to Implement is to allow the user to change the colors of the Image being cropped. I have now 3 images , Color, GrayScale and Sepia. I can change the source of the image tag using javascript so the image gets changed without reload but I cannot do this once the JCrop has been enabled because it replaces the original Image for a new one. I thought I could disable JCrop, Replace the Image and then Re-Enable, but i couldnt do such thing. The example I found where the JCrop gets destroyed (example5 in Demo zip) uses an object : jcrop_api = $.Jcrop('#cropbox'); But Im enabling JCrop in a different manner,more like Example 3 : jQuery('#cropbox').Jcrop({ onChange: showPreview, onSelect: showPreview, aspectRatio: 1 }); How can I destroy JCrop so I can replace te Image? Is there another way to do this? Please help! I Could easily reload the page each time the user changes de color of the image but we all know that's not cool. Any comments will be apreciated. Thanks

    Read the article

  • A generic error occurred in GDI+, JPEG Image to MemoryStream

    - by madcapnmckay
    Hi, This seems to be a bit of an infamous error all over the web. So much so that I have been unable to find an answer to my problem as my scenario doesn't fit. An exception gets thrown when I save the image to the stream. Weirdly this works perfectly with a png but gives the above error with jpg and gif which is rather confusing. Most similar problem out there relate to saving images to files without permissions. Ironically the solution is to use a memory stream as I am doing.... public static byte[] ConvertImageToByteArray(Image imageToConvert) { using (var ms = new MemoryStream()) { ImageFormat format; switch (imageToConvert.MimeType()) { case "image/png": format = ImageFormat.Png; break; case "image/gif": format = ImageFormat.Gif; break; default: format = ImageFormat.Jpeg; break; } imageToConvert.Save(ms, format); return ms.ToArray(); } } More detail to the exception. The reason this causes so many issues is the lack of explanation :( System.Runtime.InteropServices.ExternalException was unhandled by user code Message="A generic error occurred in GDI+." Source="System.Drawing" ErrorCode=-2147467259 StackTrace: at System.Drawing.Image.Save(Stream stream, ImageCodecInfo encoder, EncoderParameters encoderParams) at System.Drawing.Image.Save(Stream stream, ImageFormat format) at Caldoo.Infrastructure.PhotoEditor.ConvertImageToByteArray(Image imageToConvert) in C:\Users\Ian\SVN\Caldoo\Caldoo.Coordinator\PhotoEditor.cs:line 139 at Caldoo.Web.Controllers.PictureController.Croppable() in C:\Users\Ian\SVN\Caldoo\Caldoo.Web\Controllers\PictureController.cs:line 132 at lambda_method(ExecutionScope , ControllerBase , Object[] ) at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClassa.<InvokeActionMethodWithFilters>b__7() at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) InnerException: OK things I have tried so far. Cloning the image and working on that. Retrieving the encoder for that MIME passing that with jpeg quality setting. Please can anyone help.

    Read the article

  • animation on image view on grid view

    - by yahska
    i am having a grid view with 2 coloums and each item in grid view having one image and 2 textview below the image. i have added one button over each image and after clicking on button i want that image should scale and move down to bottom tab. like it should appear image drop down from its position in side one button of tabview. i am able to add animation on image using this code AnimationSet set = new AnimationSet(true); Animation trAnimation = new TranslateAnimation(0, 160,0, 100); trAnimation.setDuration(500); set.addAnimation(trAnimation); Animation scaleAnimation = AnimationUtils.loadAnimation(this, R.anim.anim_scale); set.addAnimation(scaleAnimation); set.setFillEnabled(true) ; set.setFillAfter(true); view.setAlpha(100) ; view.startAnimation(set); but problem is that image is not coming to bottom of screen it is going inside of grid item where it is placed . anybody knows how to move this image to bottom.

    Read the article

  • Rescue data from damaged hard disk

    - by Lexsys
    Hello. I have a 500 GB hard drive with one NTFS-partition on it. I can mount it with Ubuntu and view the contents. But when I try to copy something, I get an I/O error. Ok, I tried to make its image with dd. I/O error as soon as it starts. I have installed ddrescue, but its manual page says not to use it with drives, failing on I/O. Can I manage to get some information from this drive and how to do this?

    Read the article

  • How to read binary column in database into image on asp.net page?

    - by marko
    I want to read from database where I've stored a image in binary field and display a image. while (reader.Read()) { byte[] imgarr = (byte[])reader["file"]; Stream s = new MemoryStream(imgarr); System.Drawing.Image image = System.Drawing.Image.FromStream(s); Graphics g = Graphics.FromImage(image); g.DrawImage(image, new Point(400, 10)); image.Save(Response.OutputStream, ImageFormat.Jpeg); g.Dispose(); image.Dispose(); } con.Close(); This piece of code doesn't work: System.Drawing.Image image = System.Drawing.Image.FromStream(s); What am I doing wrong?

    Read the article

  • DiskArbitration image Disk (dmg)

    - by Nyxem
    Hello, I have a problem using DiskArbitration framework, to catch disk image mounting I register for DARegisterDiskMountApprovalCallback The problem is that each time a disk image is mounted the callback is called twice. Why is that and how can I solve this ? Thanks.

    Read the article

  • What is the easiest way to make a backup of an entire hard disk

    - by Solignis
    Hi there, I got myself a dell laptop from the local computer store. Its a used machine with Windows Vista Home Basic on it. I want to load Ubuntu Desktop 10.10 though so I can do perl development. BUT I want to keep a copy of the entire harddrive with the dell utility partition and Windows Vista in case I want to go back. I was thinking I could image the drive but I not sure what to use, I don't have Ghost or anything, Someone had told me about Clonezilla. Would that work for me? Is it hard to use? Also I want to burn the data to a DVD or something more storable than a harddisk.

    Read the article

  • What is the easiest way to make a backup of an entire hard disk

    - by Solignis
    Hi there, I got myself a dell laptop from the local computer store. Its a used machine with Windows Vista Home Basic on it. I want to load Ubuntu Desktop 10.10 though so I can do perl development. BUT I want to keep a copy of the entire harddrive with the dell utility partition and Windows Vista in case I want to go back. I was thinking I could image the drive but I not sure what to use, I don't have Ghost or anything, Someone had told me about Clonezilla. Would that work for me? Is it hard to use? Also I want to burn the data to a DVD or something more storable than a harddisk.

    Read the article

  • How to copy a ram_base file to disk efficiently

    - by Hui Jin
    I want to copy a large a ram-based file (located at /dev/shm direcotry) to local disk, is there some way for an efficient copy instead of read char one by one or create another piece memory? I can use only C language here. Is there anyway that I can put the memory file directly to disk? Thanks!

    Read the article

< Previous Page | 109 110 111 112 113 114 115 116 117 118 119 120  | Next Page >