Search Results

Search found 19460 results on 779 pages for 'image transparency'.

Page 4/779 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Multiple ToggleButton image with different highlight image in WPF

    - by Ryan
    I am very new to WPF and needed some pointers as to why this is not working correctly. I am trying to make a maximize button that will change to a restore button when clicked. I thought a toggle button with 2 different styles that would be changed in the code behind could work. I am first trying to get the maximize button working and have ran into a problem. I get the error 'System.Windows.Controls.Image' is not a valid value for the 'System.Windows.Controls.Image.Source' property on a Setter. in my xaml. I seem to be not understanding something completely. Any help would be most helpful :) Ryan <Style x:Key="Maximize" TargetType="{x:Type ToggleButton}"> <Style.Resources> <Image x:Key="MaxButtonImg" Source="/Project;component/Images/maxbutton.png" /> <Image x:Key="MaxButtonHighlight" Source="/Project;component/Images/maxbutton-highlight.png" /> </Style.Resources> <Setter Property="ContentTemplate"> <Setter.Value> <Image> <Image.Style> <Style TargetType="{x:Type Image}"> <Setter Property="Source" Value="{DynamicResource MaxButtonImg}"/> <Style.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Source" Value="{DynamicResource MaxButtonHighlight}"/> </Trigger> </Style.Triggers> </Style> </Image.Style> </Image> </Setter.Value> </Setter> </Style> <ToggleButton Name="MaxButton" Width="31" Height="31" BorderThickness="0" Click="MaxButton_Click" Margin="0,0,10,0" Tag="Max" Style="{DynamicResource Maximize}" /> My code behind would do something simple like this: private void MaxButton_Click(object sender, RoutedEventArgs e) { ToggleButton tg = (ToggleButton)sender; if ( tg.IsChecked == true) { tg.Style = (Style)FindResource("Restore"); this.WindowState = WindowState.Maximized; } else { tg.Style = (Style)FindResource("Maximize"); this.WindowState = WindowState.Normal; } }

    Read the article

  • J2ME Reduce Image color-depth/ Compress Image size

    - by updateraj
    Hi, I need to transmit the image from the mobile phone to the server. I am able to reduce the image screen size but not the memory size. I understand i have to deal with the color depth. J2ME does not seem to offer any scaling method which is available in J2SE: image rescaled = image.getScaledInstance(thumbWidth, thumbHeight, Image.SCALE_AREA_AVERAGING); BufferedImage biRescaled = toBufferedImage(rescaled, thumbWidth, thumbHeight, BufferedImage.TYPE_INT_RGB); How i would i tackle this ? I would like to reduce the image memory size before i transmit to the server. Thank you

    Read the article

  • problem loading texture with transparency with OpenGL ES and Android

    - by Evan Kimia
    Im trying to load an image that has background transparency that will be layered over another texture. When i try and load it, all i get is a white screen. The texture is 512 by 512, and its saved in photoshop as a 24 bit PNG (standard PNG specs in the Photoshop Save for Web and Devices config window). Any idea why its not showing? The texture without transparency shows without a problem. Here is my loadTextures method: public void loadGLTexture(GL10 gl, Context context) { //Get the texture from the Android resource directory Bitmap bitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.m1); Bitmap normalScheduleLines = BitmapFactory.decodeResource(context.getResources(), R.drawable.m1n); //Generate texture pointers... gl.glGenTextures(3, textures, 0); //...and bind it to our array gl.glBindTexture(GL10.GL_TEXTURE_2D, textures[1]); //Create Nearest Filtered Texture gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_LINEAR_MIPMAP_NEAREST); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_LINEAR); gl.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_GENERATE_MIPMAP, GL11.GL_TRUE); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S, GL10.GL_CLAMP_TO_EDGE); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T, GL10.GL_CLAMP_TO_EDGE); GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0); bitmap.recycle(); //Bind our normal schedule bus map lines gl.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]); //Create Nearest Filtered Texture gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_LINEAR_MIPMAP_NEAREST); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_LINEAR); gl.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_GENERATE_MIPMAP, GL11.GL_TRUE); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S, GL10.GL_CLAMP_TO_EDGE); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T, GL10.GL_CLAMP_TO_EDGE); GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, GL10.GL_RGBA, normalScheduleLines, 0); normalScheduleLines.recycle(); }

    Read the article

  • Convert inline image tags like [image:123:title:size] into HTML img tags

    - by Jacques Joubert
    I am looking for help with regular expression $pattern to convert inline image tags like [image:123:title:size] into HTML img tags. here is the code: //[image:ID:caption:size] $content = '[image:38:title:800x900]'; preg_match_all( '/\[image:(\d+)(:?)([^\]]*)\]/i', $content, $images ); if( !empty( $images[0] ) ) { // There are image inline tags in the content foreach( $images[0] as $i => $tag ) { $link_ID = (int)$images[1][$i]; $caption = empty( $images[2][$i] ) ? '#' : $images[3][$i]; $size = empty( $images[4][$i] ) ? '#' : $images[4][$i]; } echo '<br />'; echo 'ID: '.$link_ID.'<br />'; echo 'Tag: '.$caption.'<br />'; echo 'size: '.$size.'<br />'; } which outputs: ID: 12 Tag: caption:size size: # Any help would be great!

    Read the article

  • how to display a image in java application after downloading the image

    - by Nubkadiya
    i want to display a image after downloading that image from a web-server i have wrote the code for downloading the image. but i cant set it up to a label or any thing other than jframe (because i want to add more buttons and labels to the GUI). here is the code to download the image from the webserver. now i want to set it to a label. please help me URL url = new URL("http://www.personal.psu.edu/acr117/blogs/audrey/images/image-2.jpg"); image = ImageIO.read(url);

    Read the article

  • how to get transform a local image to a web accessable image

    - by hguser
    Hi: Generally,if we want to display a image in the web page,we give the uri of the image resource like: http://host:port/image/xxx.jpg. Now,there are some images in my file system,and I save its absolute path in the db. Like this; id name address image 1 xxxx xxxx C:/images/xxx.jpg Now if the entity is retrived,its image should be displayed in the page. How to make it? What I thought is copy the image under the web server dir,then build its url,then the page can render it. But I wonder if this is a good idea? Is there any other way?

    Read the article

  • What's the best way to learn image processing?

    - by rdasxy
    I'm a senior in college that hasn't done much image processing before (except for some basic image compression on smartphones). I'm starting a research project on machine learning next semester that would require some biomedical image processing. What's the best way to get up to speed with the basics of image processing in about two months? Or is this impractical? It's my impression that once I'm good with the basics learning more from other resources would be easier.

    Read the article

  • How do i bind an image to a <asp:Image /> tag in Form View

    - by Ranhiru
    First i have a getProfileImage.aspx which accepts a CusID and TN as query strings and display n image. So getProfileImage.aspx?CusID=10&TN=Y will show the image fine in the browser :) But... Now i am presented with a Form View and i want to bind the src of the image to get the image from the getProfileImage.aspx page... The following code works fine :) 10 is the customer ID and the image is working fine... <asp:Image ID="Image1" runat="server" Height="151px" ImageUrl='~/getProfileImage.aspx?CusID=10&TN=N' /> But now i want to Bind the CusID value... <asp:Image ID="Image1" runat="server" Height="151px" ImageUrl='~/getProfileImage.aspx?CusID=<%# Bind("CusID") %>&TN=N' /> This simply does not work :( The getProfileImage.aspx is called with CusID=<%... where the way i see it the <%# Bind("CusID") % is not parsed by ASP which would have returned 10... <%# Bind("CusID") %> The above tag alone will work... but inserting it to the middle of the tag seems to break it... Any suggestions ? Thanx a lot in advance :)

    Read the article

  • Reading Character from Image

    - by Chinjoo
    I am working on an application which requires matching of numbers from a scanned image file to database entry and update the database with the match result. Say I have image- employee1.jpg. This image will have two two handwritten entries - Employee number and the amount to be paid to the employee. I have to read the employee number from the image and query the database for the that number, update the employee with the amount to be paid as got from the image. Both the employee number and amount to be paid are written inside two boxes at a specified place on the image. Is there any way to automate this. Basically I want a solution in .net using c#. I know this can be done using artificial neural networks. Any ideas would be much appreciated.

    Read the article

  • Generate image with Drupal imagecache before using imagecache_create_path & getimagesize

    - by ozke
    Hi guys, I'm using imagecache_create_path() and getimagesize() to get the path of a imagecache-generated image and its dimensions. However, if it's the first time we access the page that image doesn't exist yet and imagecache_create_path doesn't generate it either. Here's the code: // we get the image path from a preset (always return the path even if the file doesn't exist) $small_image_path = imagecache_create_path('gallery_image_small', $image["filepath"]); // I get the image dimensions (only if the file exists already) $data_small = list($width, $height, $type, $image_attributes) = @getimagesize($small_image_path); Is there any API method to get the path AND generate the file? In other words, can I generate the image (using a preset) from PHP without showing it in the browser? Thank you in advance

    Read the article

  • How to detect an 'image area' percentage inside an image?

    - by DaNieL
    Mhh, kinda hard to explain with my poor english ;) So, lets say I have an image, doesnt matter what kind of (gif, jpg, png) with 200x200 pixel size (total area 40000 pixels) This image have a background, that can be trasparent, or every color (but i know the background-color in advance). Lets say that in the middle of this image, there is a picture (for keep the example simple lets suppose is a square drawn), of 100x100 pixels (total area 10000 pixels). I need to know the area percentage that the small square fill inside the image. So, in i know the full image size and the background-color, there is a way in php/python to scan the image and retrieve that (in short, counting the pixel that are different from the given background)? In the above example, the result should be 25%

    Read the article

  • Reading Characher from Image

    - by Chinjoo
    I am working on an application which requires matching of numbers from a scanned image file to database entry and update the database with the match result. Say I have image- employee1.jpg. This image will have two two handwritten entries - Employee number and the amount to be paid to the employee. I have to read the employee number from the image and query the database for the that number, update the employee with the amount to be paid as got from the image. Both the employee number and amount to be paid are written inside two boxes at a specified place on the image. Is there any way to automate this. Basically I want a solution in .net using c#. I know this can be done using artificial neural networks. Any ideas would be much appreciated.

    Read the article

  • Turn off transparency to perform CAS Asserts

    - by MainMa
    Hi, I apologize if my question is too stupid. I want to run from a sandboxed application a method from a full trusted assembly. But when trying to do so, as described in C# 4.0 in a Nutshell: The Definitive Reference, Fourth Edition, Chapter 20, each time I call Permission.Assert, an InvalidOperationException "Cannot perform CAS Asserts in Security Transparent methods" is thrown. So how is it possible to turn off transparency to be able to use CAS Asserts?

    Read the article

  • Program to create window transparency in XP

    - by sadmicrowave
    I'm looking for a program to create window transparency within Windows XP; somewhat like Glass2K. I've used Glass2K and found it extremely processor intensive and would like to try something else. The application needs to act upon the current Windows Theme rather than be a theme itself like Aero Glass.

    Read the article

  • Jquery 3d image carousel - IE6 transparency

    - by jsims281
    I'm using the 3d image carousel available at http://www.professorcloud.com/mainsite/carousel.htm . It's great but I've hit a wall with regards to transparency support for IE6. As the images are being manipulated by java after they are loaded, it's quite a headache. All the mainstream png fixes fail in one way or another...either breaking the carousel or being broken by the animation of the carousel. Does anybody have any ideas on how I can get round this (without using PNG8, .gif etc).

    Read the article

  • How to make background image black-and-white?

    - by Dmitri
    Are there any filters that would make background image to be displayed as black-and-white? What I mean, is this: i have a background image set via css using background: url(/image.png); But now I need to apply a filter so that an image is shown as black-white only. Ideally, I would like to also apply opacity to it. The effect I really trying to achieve is to have background image black/white and on hover over that span element the filter would be removed, revealing the color version. And of cause it has to work in FF, Chrome, IE Can someone help me?

    Read the article

  • RGB values from image into a one dimension array in c#

    - by velocityxyz
    I was wondering if there is a was a way to read rgb values from an image into a one dimensional array in C#. If it doesnt make sense, in java I would do something like this. int[] pixels; BufferedImage image = getClass().getResourceAsStream("asdfghjkl.png"); int w = image.getWidth(); int h = image.getHeight(); pixels = new int[w * h]; image.getRGB(0, 0, w, h, pixels, 0, w) ; So any help would be great, or if you can point me in the right direction, that'd be great

    Read the article

  • Fade portfolio image on hover to reveal a magnifying glass or plus sign etc?

    - by ade123
    Hi, I've seen an interesting image hover effect being used a lot lately and was wondering whether anyone has any tips or advice on how best to create this effect? What I'd like to create is a hover effect, so that when you hover over an image, the image fades and a magnifying glass or similar icon fades in. Highlighting the fact that if you click the image, it will enlarge etc. Here is a nice example of the effect: http://themes.mysitemyway.com/infocus/gallery/portfolio/ Any advice or pointers would be greatly appreciated.

    Read the article

  • IE6 transparency+radio button can't be clicked

    - by Jonas Byström
    IE6: when I place a partially transparent image in a div, the radio buttons in that div that overlap the non-transparent pixels of the image become unclickable. Example: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <style media="screen" type="text/css"> div { position: relative; width: 500px; height: 300px; _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://upload.wikimedia.org/wikipedia/commons/thumb/f/fc/Olympic_flag_transparent.svg/200px-Olympic_flag_transparent.svg.png, sizingMethod='crop'); } input { position: absolute; top: 40px; left: 60px; } </style> </head> <body> <div> <input type="radio" value="1" name="1"/> </div> </body> </html> If you test the code, you can also try moving the button from (60, 40) to (40, 40) where the image is transparent, and voilà - the clicking is back in business again. This bug might, or might not, be related to the IE6 links transparency bug, but I'm not knowledgable enough to grasp any resemblence. Have I done something wrong? Or how can I circumvent? Is there some other option apart from removing the _filter:progid?

    Read the article

  • SFML: Generate a background image

    - by BlackMamba
    I want to generate a background, which is used in the game, on every instance of the game based on certain conditions. To do so, I'm using a sf::RenderTexture and a sf::Texture like this: sf::RenderTexture image; std::vector<sf::Texture> textures; sf::Texture texture; // instantiating the vector of textures and the image not shown here for (int i = 0; i < certainSize; ++i) { if(certainContition) { texture.setTexture("file"); texture.setPosition(pos1, pos2); } else { ... } image.draw(texture); } The point here is that I draw single textures on a sf::RenderTexture, but because textures always are on the graphic cards memory, I can't exceed a certain map size which I have to. I also considered using an sf::Image, but I can't find a way to draw an image (i.e. a texture) to it. The third way I found was using an sf::VertexArray, but this seems to be a bit too low-level for my rather simple purposes. So is there a common way to dynamically generate a background image based on other existing images?

    Read the article

  • PHP GD Text Transparency..

    - by Deagle
    Hello, I can't slove this. I'm trying to make a text transparency but doesn't work.. Here how it looks: qshort.com/userbar/gd.php Here how if possible to show with transparency: qshort.com/userbar/transparent.png Is that possible? Here my PHP Code: <?php header('Content-type: image/png'); $im = imagecreatefrompng("signature.png"); $white = imagecolorallocate($im, 255, 255, 255); $grey = imagecolorallocate($im, 114, 114, 114); $black = imagecolorallocate($im, 0, 0, 0); $tr = imagecolorallocatealpha($im, 255, 255, 255, 20); $trg = imagecolorallocatealpha($im, 114, 114, 114, 50); $font = 'TCCB.TTF'; $mtext="Money: $0"; $mx="261"; $my="80"; $ms="16"; imagettftext($im, $ms, 0, $mx+1, $my, $grey, $font, $mtext); imagettftext($im, $ms, 0, $mx-1, $my, $grey, $font, $mtext); imagettftext($im, $ms, 0, $mx, $my+1, $grey, $font, $mtext); imagettftext($im, $ms, 0, $mx, $my-1, $grey, $font, $mtext); imagettftext($im, $ms, 0, $mx, $my, $white, $font, $mtext); $atext="Score: 0"; $ax="261"; $ay="100"; $as="16"; imagettftext($im, $as, 0, $ax+1, $ay, $grey, $font, $atext); imagettftext($im, $as, 0, $ax-1, $ay, $grey, $font, $atext); imagettftext($im, $as, 0, $ax, $ay+1, $grey, $font, $atext); imagettftext($im, $as, 0, $ax, $ay-1, $grey, $font, $atext); imagettftext($im, $as, 0, $ax, $ay, $white, $font, $atext); $ctext="Properties: 0"; $cx="261"; $cy="120"; $cs="16"; imagettftext($im, $cs, 0, $cx+1, $cy, $grey, $font, $ctext); imagettftext($im, $cs, 0, $cx-1, $cy, $grey, $font, $ctext); imagettftext($im, $cs, 0, $cx, $cy+1, $grey, $font, $ctext); imagettftext($im, $cs, 0, $cx, $cy-1, $grey, $font, $ctext); imagettftext($im, $cs, 0, $cx, $cy, $white, $font, $ctext); $ntext="Nickname"; $nx="20"; $ny="45"; $ns="35"; imagettftext($im, $ns, 0, $nx+1, $ny, $trg, $font, $ntext); imagettftext($im, $ns, 0, $nx-1, $ny, $trg, $font, $ntext); imagettftext($im, $ns, 0, $nx, $ny+1, $trg, $font, $ntext); imagettftext($im, $ns, 0, $nx, $ny-1, $trg, $font, $ntext); imagettftext($im, $ns, 0, $nx, $ny, $tr, $font, $ntext); imagepng($im); imagedestroy($im); ?> Thanks, Waiting for answer.

    Read the article

  • WPF / C#: Transforming coordinates from an image control to the image source

    - by Gabriel
    I'm trying to learn WPF, so here's a simple question, I hope: I have a window that contains an Image element bound to a separate data object with user-configurable Stretch property <Image Name="imageCtrl" Source="{Binding MyImage}" Stretch="{Binding ImageStretch}" /> When the user moves the mouse over the image, I would like to determine the coordinates of the mouse with respect to the original image (before stretching/cropping that occurs when it is displayed in the control), and then do something with those coordinates (update the image). I know I can add an event-handler to the MouseMove event over the Image control, but I'm not sure how best to transform the coordinates: void imageCtrl_MouseMove(object sender, MouseEventArgs e) { Point locationInControl = e.GetPosition(imageCtrl); Point locationInImage = ??? updateImage(locationInImage); } Now I know I could compare the size of Source to the ActualSize of the control, and then switch on imageCtrl.Stretch to compute the scalars and offsets on X and Y, and do the transform myself. But WPF has all the information already, and this seems like functionality that might be built-in to the WPF libraries somewhere. So I'm wondering: is there a short and sweet solution? Or do I need to write this myself? EDIT I'm appending my current, not-so-short-and-sweet solution. Its not that bad, but I'd be somewhat suprised if WPF didn't provide this functionality automatically: Point ImgControlCoordsToPixelCoords(Point locInCtrl, double imgCtrlActualWidth, double imgCtrlActualHeight) { if (ImageStretch == Stretch.None) return locInCtrl; Size renderSize = new Size(imgCtrlActualWidth, imgCtrlActualHeight); Size sourceSize = bitmap.Size; double xZoom = renderSize.Width / sourceSize.Width; double yZoom = renderSize.Height / sourceSize.Height; if (ImageStretch == Stretch.Fill) return new Point(locInCtrl.X / xZoom, locInCtrl.Y / yZoom); double zoom; if (ImageStretch == Stretch.Uniform) zoom = Math.Min(xZoom, yZoom); else // (imageCtrl.Stretch == Stretch.UniformToFill) zoom = Math.Max(xZoom, yZoom); return new Point(locInCtrl.X / zoom, locInCtrl.Y / zoom); }

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >