Search Results

Search found 4481 results on 180 pages for 'black rez'.

Page 115/180 | < Previous Page | 111 112 113 114 115 116 117 118 119 120 121 122  | Next Page >

  • Screen Capture Under Win7 of JOGL Applet

    - by binarybug
    Hi I'm trying to take a screen shot of an applet running inside a browser. The applet is using JOGL (OpenGL for Java) to display 3D models. (1) The screen shots always come out either black or white.The current solution uses the usual GDI calls. Screen shots of applets not running OpenGL are fine. A few examples of JOGL apps can be found here https://jogl-demos.dev.java.net/ (2) Another thing I'm trying to achieve is to get the scrollable area inside the screen shot as well. I found this code on the internet which works fine except for the 2 issues mentioned above. import win32gui as wg import win32ui as wu import win32con def copyBitMap(hWnd, fname): wg.SetForegroundWindow(hWnd) cWnd = wu.CreateWindowFromHandle(hWnd) rect = cWnd.GetClientRect() (x,y) = (rect[2] - rect[0], rect[3] - rect[1]) hsrccDc = wg.GetDC(hWnd) hdestcDc = wg.CreateCompatibleDC(hsrccDc) hdestcBm = wg.CreateCompatibleBitmap(hsrccDc, x, y) wg.SelectObject(hdestcDc, hdestcBm.handle) wg.BitBlt(hdestcDc, 0, 0, x, y, hsrccDc, rect[0], rect[1], win32con.SRCCOPY) destcDc = wu.CreateDCFromHandle(hdestcDc) bmp = wu.CreateBitmapFromHandle(hdestcBm.handle) bmp.SaveBitmapFile(destcDc, fname)

    Read the article

  • Macromedia Flash 8 - Ireland Map, on mouseover dublin, dublin expands

    - by DJDonaL3000
    Macromedia Flash 8 Question: I have a map of Ireland, just a gif, and there are several small buttons representing various point of interest around Ireland, which are scattered across the map. This part works fine. THE PROBLEM: Dublin is too small to contain all of its points of interest (approx 20). THE SOLUTION OnMouseOver Dublin, I would like Dublin to expand to perhaps 5 or 6 times its original size, and I would like to be able to have Dublins Points Of Interests now displayed within this larger dublin area, which sits on top of the Ireland map. OnMouseOut Dublin, this enlarged Dublin region now shrinks back to its original size. MY QUESTION: How do I implement Dublin?? REQUIREMENTS: 1) The expanded Dublin region shud NOT be clickable, it shud simply be a dublin image on a black background. 2) It must be possible to add additional buttons within this expanded Dublin region. Any help or assistance greatly appreciated...

    Read the article

  • Is there any super fast algorithm for finding LINES on picture?

    - by Ole Jak
    So I have Image like this I need some super fast algorithm for finding all straight lines on it. I want to give to algorithm parameters like min length and max line distortion. I want to get relative to picture pixel coords start and end points of lines. So on this picture to find all lines between dalles and thouse 2 black lines on top. So I need algorithm for super fast finding straight lines of different colors on picture. Is there any such algorithm? (super duper fast=)

    Read the article

  • OutOfMemoryException with Image.Clone - Only on Windows 2003

    - by Jeff Rapp
    So here's my issue. I have an image that I need to shrink. The original image is a grayscale PNG, which isn't a huge issues except that when I shrink it down, the thermal label printers pickup the artifacts and print them on the label. So, what I did was change the image to black & white (Format1bppIndexed) before resizing, like this: Dim bte() As Byte = System.Convert.FromBase64String(imgStr) Dim ms As New IO.MemoryStream(bte) Dim bmp As New System.Drawing.Bitmap(ms) Dim monoImage As Drawing.Bitmap = New Drawing.Bitmap(1200, 1800, Drawing.Imaging.PixelFormat.Format1bppIndexed) Dim rect As New Drawing.Rectangle(0, 0, 1200, 1800) monoImage = bmp.Clone(rect, Drawing.Imaging.PixelFormat.Format1bppIndexed) And then I resize it. This code works fine on my Windows 7 machine, but when I run it on the Windows 2003 Server box that it calls home, it always throws an OutOfMemoryException when it hits the bmp.Clone line. Any ideas as to what's happening, or perhaps a better solution to converting the image to B&W?

    Read the article

  • Giving an Error Object Expected Line 48 Char 1

    - by Leslie Peer
    Giving an Error Object Expected Line 48 Char 1------What did I do wrong??? *Note Line # are for reference only not on Original Web page****** <HTML><HEAD><TITLE></TITLE> <META http-equiv=Content-Type content="text/html; charset=utf-8"> <META content="Leslie Peer" name=author> <META content="Created with Trellian WebPage" name=description> <META content="MSHTML 6.00.6000.16809" name=GENERATOR> <META content=Index name=keywords> <STYLE type=text/css>BODY { COLOR: #000000; BACKGROUND-REPEAT: repeat; FONT-FAMILY: Accent SF, Arial, Arial Black, Arial Narrow, Century Gothic, Comic Sans MS, Courier, Courier New, Georgia, Microsoft Sans Serif, Monotype Corsiva, Symbol, Tahoma, Times New Roman; BACKGROUND-COLOR: #666666 } A { FONT-SIZE: 14px; FONT-FAMILY: Arial Black, Bookman Old Style, DnD4Attack, Lucida Console, MS Serif, MS Outlook, MS Sans Serif, Rockwell Extra Bold, Roman, Star Time JL, Tahoma, Terminal, Times New Roman, Verdana, Wingdings 2, Wingdings 3, Wingdings } A:link { COLOR: #9966cc; TEXT-DECORATION: underline } A:visited { COLOR: #66ff66; TEXT-DECORATION: underline } A:hover { COLOR: #ffff00; TEXT-DECORATION: underline } A:active { COLOR: #ff0033; TEXT-DECORATION: underline } H1 { FONT-SIZE: 25px; COLOR: #9966cc; FONT-FAMILY: Century Gothic } H2 { FONT-SIZE: 20px; COLOR: #ff33cc; FONT-FAMILY: Century Gothic } H3 { FONT-SIZE: 18px; COLOR: #6666cc; FONT-FAMILY: Century Gothic } H4 { FONT-SIZE: 15px; COLOR: #00cc33; FONT-FAMILY: Century Gothic } H5 { FONT-SIZE: 10px; COLOR: #ffff33; FONT-FAMILY: Century Gothic } H6 { FONT-SIZE: 5px; COLOR: #996666; FONT-FAMILY: Century Gothic } </STYLE> line 46-<SCRIPT> line 47- CharNum=6; line 48-var Character=newArray();Character[0]="Larry Lightfoot";Character[1]="Sam Wrightfield";Character[2]="Gavin Hartfild";Character[3]="Gail Quickfoot";Character[4]="Robert Gragorian";Character[5]="Peter Shain"; line 49-var ExChar=newArray();ExChar[0]="Tabor Bloomfield"; line 50-var Class=newArray();Class[0]="MagicUser";Class[1]="Fighter";Class[2]="Fighter";Class[3]="Thief";Class[4]="Cleric";Class[5]="Fighter"; line 51-line 47var ExClass=newArray();ExClass[0]="MagicUser"; line 52-var Level=newArray();Level[0]="2";Level[1]="1";Level[2]="1";Level[3]="2";Level[4]="2";Level[5]="1"; line 53-var ExLevel=newArray();ExLevel[0]="23"; line 54-var Hpts=newArray();Hpts[0]="6";Hpts[1]="14";Hpts[2]="13";Hpts[3]="8";Hpts[4]="12";Hpts[5]="15"; line 55-var ExHpts=newArray();ExHpts[0]="145"; line 56-var Armor=newArray();Armor[0]="Cloak";Armor[1]="Splinted Armor";Armor[2]="Chain Armor";Armor[3]="Leather Armor";Armor[4]="Chain Armor";Armor[5]="Splinted Armor"; line 57-var ExArmor=newArray();ExArmor[0]="Robe of Protection +5"; line 58-var Ac1=newArray();Ac1[0]="0";Ac1[1]="3";Ac1[2]="3";Ac1[3]="4";Ac1[4]="2";Ac1[5]="3"; line 59-var ExAc=newArray();ExAc[0]="5"; line 60-var Armor1b=newArray();Armor1b[0]="Ring of Protection +1";Armor1b[1]="Small Shield";Armor1b[2]="Small Shield";Armor1b[3]="Wooden Shield";Armor1b[4]="Large Shield";Armor1b[5]="Small Shield"; line 61-var ExArmor1b=newArray();ExArmor1b[0]="Ring of Protection +5"; line 62-var Ac2=newArray();Ac2[0]="1";Ac2[1]="1";Ac2[2]="1";Ac2[3]="1";Ac2[4]="1";Ac2[5]="1"; line 63-var ExAc1b=newArray();ExAc1b[0]="5" line 64-var Str=newArray();Str[0]="15";Str[1]="16";Str[2]="14";Str[3]="13";Str[4]="14";Str[5]="13"; line 65-var ExStr=newArray();ExStr[0]=21; line 66-var Int=newArray();Int[0]="17";Int[1]="11";Int[2]="12";Int[3]="13";Int[4]="14";Int[5]="13"; line 67-var ExInt=newArray();ExInt[0]="19"; line 68-var Wis=newArray();Wis[0]="17";Wis[1]="12";Wis[2]="14";Wis[3]="13";Wis[4]="14";Wis[5]="12"; line 69-var ExWis=newArray();ExWis[0]="18"; line 70-var Dex=newArray();Dex[0]="15";Dex[1]="14";Dex[2]="13";Dex[3]="15";Dex[4]="14";Dex[5]="12"; line 71-var ExDex=newArray();ExDex[0]="19"; line 72-var Con=newArray();Con[0]="16";Con[1]="15";Con[2]="16";Con[3]="13";Con[4]="12";Con[5]="10"; line 73-var ExCon=newArray();ExCon[0]="19"; line 74-var Chr=newArray();Chr[0]="16";Chr[1]="14";Chr[2]="13";Chr[3]="12";Chr[4]="14";Chr[5]="13"; line 75-var ExChr=newArray();ExChr[0]="21"; line 76-var Expt=newArray();Expt[0]="45";Expt[1]="21";Expt[2]="16";Expt[3]="18";Expt[4]="22";Expt[5]="34"; line 77-var ExExpt=newArray();ExExpt[0]="245678"; line 78-var ExBp=newArray();ExBp[0]="Unknown";ExBp[1]="Extrademensional Plane World of Amborsia";ExBp[2]="Evil Wizard Banished for Mass Geniocodes"; line 79-</SCRIPT> line 80-</HEAD> line 81-<BODY> Giving an Error Object Expected Line 48 Char 1------What did I do wrong??? *Note Line # are for reference only not on Original Web page******

    Read the article

  • Image cropping in PHP is producing blank result

    - by thinkswan
    I'm simply trying to crop a JPEG image (no scaling) using PHP. Here is my function, along with the inputs. function cropPicture($imageLoc, $width, $height, $x1, $y1) { $newImage = imagecreatetruecolor($width, $height); $source = imagecreatefromjpeg($imageLoc); imagecopyresampled($newImage,$source,0,0,$x1,$y1,$width,$height,$width,$height); imagejpeg($newImage,$imageLoc,90); } When I call it as follows--cropPicture('image.jpg', 300, 300, 0, 0)--the function completes properly, but I'm left with a black image that is 300x300 px (in other words, a blank canvas). Am I passing in the wrong arguments? The image exists and is writeable.

    Read the article

  • How to find version of WIC Windows Imaging Component

    - by anwar
    How to find version of WIC Windows Imaging Component. Is it shipped with OS like XP, Vista, etc. I am using WPF application having TIFF image, which is having some issues ie the image is showing black with certain height; someone on the forum suggested that it might be the issue with WIC version 1. Can anybody please tell me how to find the Version of WIC. Is it a known bug with WIC ver 1 having issue with Large tiff files, if so then please provide me the Microsoft confirmation link for this Bug. Regards

    Read the article

  • Windows Vista Update Now Wont Boot Up

    - by thatryan
    My friend just updated her Windows Vista to service pack 1, or tried to. Now it wont boot up. Just black screen, some errors etc. I tried googling it and lots of people had this problem it seems. Anyone find a fix for it? I read somewhere I believe that Microsoft said to delete some files, Nvidia maybe? But I can not find that again, I forgot the exact error code I searched for before. Does anyone know what I am talking about? LOL Thanks guys.

    Read the article

  • How do I sign exes and dlls with my code signing certificate

    - by Tim
    (I purchased a code signing cert from Thawte and have been going out of my mind with frustration at the whole process. What I have from them are: .spc / .p7b file .pvk file (NOTE I do not have a pfx file from them. God knows why, but I have been fighting with their tech support for a week) In any case I find "help" links on their site and at MS for signcode.exe which is useless for me because I can't find that exe on my machine, however I do have signtool.exe. Unfortunately i am mystified at the command line parameters listed on this MS help site. Specifically, what parameters do I use and what values? I tried what I thought was obvious but it does not work at all. I can get the signing wizard to work, however I need this to work non-interactively in a hudson CI batch file. It really doesn't seem like it should be this difficult, but so far it is all black magic. thanks for any help

    Read the article

  • putpixel with pyglet

    - by pts
    I'm new to pyglet. I'd like to change a pixel from black to white at each on_draw iteration. So after 1000 iterations, there should be exactly 1000 white pixels in the window. However, I'd like to avoid calling 1000 draw operations in on_draw for that. So I'd like to create an image, do an RGB putpixel on the image, and blit the image to the screen. How can I do that? The pyglet documentation, the examples and the source code aren't too helpful on this.

    Read the article

  • Help in using shape drawable as my background xml

    - by n179911
    I really appreciate if someone can help me with using how to use shape drawable as my background xml for my view. This is what I tried: But I never get the color. Android always gives me black text on white background, regardless what color attribute I put. <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <stroke android:width="1dip" android:color="#FBBB" /> <solid android:color="#6000"/> </shape> I tried , does not work <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" android:color="#6000> </shape> I tried , does not work <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" android:background="#6000> </shape> I google this is the limited result I found to try.

    Read the article

  • Parsing SGF files in C#

    - by mafutrct
    The text-based Smart Game Format has become the sole file format for exchanging Go game records by now. I stared with disbelieve that there are almost no parsers available. Google yielded a few results in antique Java and Python, but no modern implementations. I am curious if I have to write my own parser. Do you know of a modern implementation in C# or Java? In case there really are no parsers available, how should I implement one? Are there general guidelines or tools (in a C# environment) I should know of? This is an example file: (;GM[1]FF[4]CA[UTF-8]AP[CGoban:3]ST[2] RU[Japanese]SZ[19]KM[6.50] PW[White]PB[Black] ;B[pd] ;W[dc] ;B[dq] ;W[pp] ;B[ce] (;W[ed] ;B[ci] ;W[kc]) (;W[do] ;B[dl] ;W[gp] ;B[eo] ;W[en] ;B[fo]))

    Read the article

  • javascript: how to make input selected

    - by Syom
    i have to use the following function, to change the input's type <input class="input" id="pas" type="text" name="password" style="color: #797272;" value= "<?php if ($_POST[password] != '') {echo '';} else {echo '????????';}?>" onclick="if (this.value =='????????') { this.value=''; this.style.color='black'; change(); }" /> <script type="text/javascript"> function change() { var input=document.getElementById('pas'); var input2= input.cloneNode(false); input2.type='password'; input.parentNode.replaceChild(input2,input); } </script> it works fine, but i have to reclick on input, because it creates a new input. so what can i do, if i want it to create a new input with cursor in it? thanks

    Read the article

  • Using widthratio tag properly

    - by owca
    Hi. In my application I need to show in template stocks for my products. So from product view I'm returning variable {{stock}} which is my amount and then I'm trying to use it in template : <div class="bar_in" width="{% widthratio {{stock}} 10 100 %}px" style="background:black;"></div> But it constantly give me "Could not parse the remainder: '{{stock}}' from '{{stock}}' " error. I've tried casting it as int but still the same problem. How to make it work properly ?

    Read the article

  • How to solve/hack fading semi-transparent PNG bug in IE8?

    - by Soul_Master
    As you know, IE6 has bug that can't display semi-transparent PNG file without using non-standard style like filter. In IE7, this problem is fixed. But It still has some bug about PNG file. It can't correctly display fading semi-transparent PNG file. You can clearly see it when you use show/hide function in jQuery with semi-transparent PNG file. The background of image is displayed with non-transparent black color. Do you have any idea for solve this question by using jQuery. Update Let's see my testing As you see, IE8 always incorrectly displays PNG-24 image. Moreover, IE8 still correctly display PNG-8 image when I fade(jQuery.fadeOut function) it only. But It incorrectly display PNG-8 image when I fade & resize(jQuery.hide function) at the same time. PS. You can download my testing source code from here. Thanks,

    Read the article

  • How create UIImage from bytes ?

    - by Sergey
    Hello, all! I need in UIImage created from my colors (for example, i need in image 1x1 pixel with black color). I've got array: unsigned char *color[] = {0, 0, 0, 1}; How can i create UIImage from this array ? I've try unsigned char *bytes[4] = {0,0,0,1}; NSData *data = [NSData dataWithBytes:bytes length:4]; UIImage *img = [UIImage imageWithData:data]; but this method has no result...

    Read the article

  • Databind a datagrid header combobox from ViewModel

    - by Mike
    I've got a Datagrid with a column defined as this: <Custom:DataGridTextColumn HeaderStyle="{StaticResource ComboBoxHeader}" Width="Auto" Header="Type" Binding="{Binding Path=Type}" IsReadOnly="True" /> The ComboBoxHeader style is defined in a resource dictionary as this: <Style x:Key="ComboBoxHeader" TargetType="{x:Type my:DataGridColumnHeader}"> <Setter Property="VerticalContentAlignment" Value="Center"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type my:DataGridColumnHeader}"> <ControlTemplate.Resources> <Storyboard x:Key="ShowFilterControl"> <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="filterComboBox" Storyboard.TargetProperty="(UIElement.Visibility)"> <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}"/> <DiscreteObjectKeyFrame KeyTime="00:00:00.5000000" Value="{x:Static Visibility.Visible}"/> </ObjectAnimationUsingKeyFrames> <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="filterComboBox" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)"> <SplineColorKeyFrame KeyTime="00:00:00" Value="Transparent"/> <SplineColorKeyFrame KeyTime="00:00:00.5000000" Value="White"/> </ColorAnimationUsingKeyFrames> </Storyboard> <Storyboard x:Key="HideFilterControl"> <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="filterComboBox" Storyboard.TargetProperty="(UIElement.Visibility)"> <DiscreteObjectKeyFrame KeyTime="00:00:00.4000000" Value="{x:Static Visibility.Collapsed}"/> </ObjectAnimationUsingKeyFrames> <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="filterComboBox" Storyboard.TargetProperty="(UIElement.OpacityMask).(SolidColorBrush.Color)"> <SplineColorKeyFrame KeyTime="00:00:00" Value="Black"/> <SplineColorKeyFrame KeyTime="00:00:00.4000000" Value="#00000000"/> </ColorAnimationUsingKeyFrames> </Storyboard> </ControlTemplate.Resources> <my:DataGridHeaderBorder x:Name="dataGridHeaderBorder" Margin="0" VerticalAlignment="Top" Height="31" IsClickable="{TemplateBinding CanUserSort}" IsHovered="{TemplateBinding IsMouseOver}" IsPressed="{TemplateBinding IsPressed}" SeparatorBrush="{TemplateBinding SeparatorBrush}" SeparatorVisibility="{TemplateBinding SeparatorVisibility}" SortDirection="{TemplateBinding SortDirection}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" Grid.ColumnSpan="1"> <Grid x:Name="grid" Width="Auto" Height="Auto" RenderTransformOrigin="0.5,0.5"> <Grid.RenderTransform> <TransformGroup> <ScaleTransform/> <SkewTransform/> <RotateTransform/> <TranslateTransform/> </TransformGroup> </Grid.RenderTransform> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}"> <ContentPresenter.Content> <MultiBinding Converter="{StaticResource headerConverter}"> <MultiBinding.Bindings> <Binding ElementName="filterComboBox" Path="Text" /> <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Content" /> </MultiBinding.Bindings> </MultiBinding> </ContentPresenter.Content> </ContentPresenter> <ComboBox ItemsSource="{Binding Path=Types}" x:Name="filterComboBox" VerticalAlignment="Center" HorizontalAlignment="Right" MinWidth="20" Height="Auto" OpacityMask="Black" Visibility="Collapsed" Text="" Grid.Column="0" Grid.ColumnSpan="1"/> </Grid> </my:DataGridHeaderBorder> <ControlTemplate.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Trigger.EnterActions> <BeginStoryboard x:Name="ShowFilterControl_BeginStoryboard" Storyboard="{StaticResource ShowFilterControl}"/> <StopStoryboard BeginStoryboardName="HideFilterControl_BeginShowFilterControl"/> </Trigger.EnterActions> <Trigger.ExitActions> <BeginStoryboard x:Name="HideFilterControl_BeginShowFilterControl" Storyboard="{StaticResource HideFilterControl}"/> <StopStoryboard BeginStoryboardName="ShowFilterControl_BeginStoryboard"/> </Trigger.ExitActions> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> <Setter Property="Background"> <Setter.Value> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="#FF0067AD" Offset="1"/> <GradientStop Color="#FF003355" Offset="0.5"/> <GradientStop Color="#FF78A8C9" Offset="0"/> </LinearGradientBrush> </Setter.Value> </Setter> <Setter Property="Foreground" Value="White"/> <Setter Property="BorderBrush"> <Setter.Value> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="#D8000000" Offset="0.664"/> <GradientStop Color="#7F003355" Offset="1"/> </LinearGradientBrush> </Setter.Value> </Setter> <Setter Property="FontWeight" Value="Bold"/> <Setter Property="BorderThickness" Value="1,1,1,0"/> <Setter Property="HorizontalContentAlignment" Value="Center"/> <Setter Property="Padding" Value="5,0"/> </Style> As you can see, I'm trying to databind the combobox's ItemsSource to Types, but this doesn't work. The list is in my ViewModel that is being applied to my page, how would I specify in this style that is in my resource dictionary that I want to bind to a source in my viewmodel.

    Read the article

  • [OpenGl] Loading new texture into already defined texture name

    - by Dan Vogel
    I have an OpenGl program in which I am displaying an image using textures. I want to be able to load a new image to be displayed. In my Init function I call: Gl.glGenTextures(1, mTextures); Since only one image will be displayed at time, I am using the same texture name for each image. Each time a new image is loaded I call the following: Gl.glBindTexture(Gl.GL_TEXTURE_2D, mTexture[0]); Gl.glTexImage2D(Gl.GL_TEXTURE_2D, 0, Gl.GL_LUMINANCE, mTexSizeX, mTexSizeY, 0, Gl.GL_LUMINANCE, Gl.GL_UNSIGNED_SHORT, mTexBuffer); Gl.glTexParameteri(Gl.GL_TEXTURE_2D, Gl.GL_TEXTURE_MIN_FILTER, Gl.GL_LINEAR); Gl.glTexParameteri(Gl.GL_TEXTURE_2D, Gl.GL_TEXTURE_MAG_FILTER, Gl.GL_LINEAR); The first image will display as expected. However, all images load after the first, display as all black. What am I doing wrong?

    Read the article

  • To store images in SQL or not?

    - by Brett
    Generally, I had thought it was always better to store images in the filesystem and link to it via the database entry. However, I am trying to optimize my db design and am having a few questions. My images are all really small thumbmails in black and white (not greyscale, but true B&W) and are 70x70 in size. If we take the images (which is basically a 2D array of 1 and 0), it can be stored as binary data that would be approximately 600 bytes each. So my question is whether querying the 600 bytes stored in a db would be faster than querying a link followed by accessing the filesystem; assuming there are a lot of "image" queries being made. Does anyone have any experience with this area? If it matters, I am using MySQL, and MonetDB (separately, but have the same question for both). Many thanks, Brett

    Read the article

  • Using CSS Classes for individual effects - opinions?

    - by Cool Hand Luke UK
    Hey, Just trying to canvas some opinions here. I was wondering how people go about adding individual effects to html elements. Take this example: you have three types of h1 titles all the same size but some are black some are gold and some are white. Some have a text-shadow etc. Would you create separate CSS classes and add them do the h1 tag or would you create a new single class for each different h1 title type (with grouped CSS elements)? With singular class for each effect you can build up combos of classes in html class="gold shadow" but also how would you name them. For example its bad practice to give classes and id names associated to colours, because it doesn't define what it does well. However is this ok with textual CSS classes? Just wondering what others do, I know there are no hard and fast rules. Cheers.

    Read the article

  • Simple way to implement computer-go board in Java

    - by codingbear
    I want to make a simple Go board to design an Computer Go game. In a go game, you lie a "stone" (white or black) on a position where horizontal and vertical lines intersect. What are some simple ways to restrict users from placing their stones in other locations? Maybe I'm just not seeing a simple solution. EDIT I guess I should rephrase my question better: I want to know how to do the background image of Go board, so that I can lie my stones on the intersection of the horizontal and the vertical lines. I was thinking about getting a just regular Go board image, and when I'm actually rendering stones, I find right position of pixels to lie stones. However, that solution did not seem to be the best solution, since I need to worry about size of stone images and think about proportionality when I either expand or shrink the board window.

    Read the article

  • Why the CCLayer can't use a for loop in draw method??

    - by Tattat
    I have a CClayer, that have a draw method, every second, it will call the draw method 60 times. So, I have method like this: -(void)draw{ glEnable(GL_LINE_SMOOTH); glColor4f(0.0f, 1.0f, 0.0f, 1.0f); glLineWidth(5.0f); ccDrawLine(ccp(300,20), CGPointZero); } I work great. but after I added a for looop, for example....: -(void)draw{ glEnable(GL_LINE_SMOOTH); glColor4f(0.0f, 1.0f, 0.0f, 1.0f); glLineWidth(5.0f); ccDrawLine(ccp(300,20), CGPointZero); for(int i=0; i<5; i++){ NSLog(@"Testing the loop, %i", i); } } It can't draw anything, the screen only black. But I can see the Testing the loop is keep calling.... Why? thank you.

    Read the article

  • [WPF] Format datagrid row foreground depends on data

    - by ktutnik
    Hi everyone, Im new in wpf, i though it was an easy task. i searched in the internet but not lucky to found any help regarding this problem. <Style TargetType="{x:Type DataGridRow}"> <Setter Property="Foreground" Value="{Binding Converter=conditionToColorConverter}"/> </Style> the problem is how to pass the row data to the value.. the converter will return RED or BLACK color when specified properties of the row data match some category. or maybe there is an easy way to do that? Thanks in advance Kin

    Read the article

  • Remote iPhone / xCode application development?

    - by ANE
    4 java developers are new to iPod Touch/iPhone app development. They have an idea for an app. They have never used Xcode or Macs before. Instead of spending money for a new iMac or Mac Mini for each of them, my boss would like to sell them a $999 Apple server, hosted at a facility connected a single T1 line, and have all 4 people work remotely in Xcode. Is this feasible? Is anyone doing anything like this? Specifically, is 1 T1 enough for realistic remote app development? Would they have to work in black & white via Logmein or Gotomeeting to get decent speed? Can four people work remotely together on an Xcode project at the same time? Do they absolutely need their own Macs to connect their iPod Touches or iPhones physically to, or can they connect to their existing PCs with iTunes and install their in-development apps that way?

    Read the article

  • Turning an NSImage* into a CGImageRef?

    - by Brian Postow
    Is there an easy way to do this that works in 10.5? In 10.6 I can use nsImage CGImageForProposedRect: NULL context: NULL hints: NULL If I'm not using 1b black and white images (Like Group 4 TIFF), I can use bitmaps, but cgbitmaps seem to not like that setup... Is there a general way of doing this? I need to do this because I have an IKImageView that seems to only want to add CGImages, but all I've got are NSImages. Currently, I'm using a private setImage:(NSImage*) method that I'd REALLY REALLY rather not be using...

    Read the article

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