Search Results

Search found 1682 results on 68 pages for 'colors'.

Page 24/68 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • Magick++ Read Image with ICC colorspace

    - by FlashFan
    Hi guys I need to know how I can read an image which uses a separate ICC Color Profile. The image consists of 26'099'520 Bytes which is the result of 2480 width* 3508 height * 3 components per pixel. I tried it with the following code: Image * image = new Image(); Blob * blob = new Blob(imagedata.c_str(),imagedata.length()); image->read(*blob,Geometry(2480,3508),8,"RGB"); Blob * iccblob = new Blob(iccdata.c_str(),iccdata.length()); image->iccColorProfile(*iccblob); image->write("result.jpg"); But the colors are the same as when I don´t set the Icc-profile to the image. And the colors are wrong in both cases. Thanks for your help!

    Read the article

  • Add C pointer to NSMutableArray

    - by Georges Oates Larsen
    I am writing an Objective-C program that deals with low level image memory. I am using ANSI-C structs for my data storage -- Full blown objects seem overkill seeing as the data I am storing is 100% data, with no methods to operate on that data. Specifically, I am writing a customizable posterization algorithm which relies on an array of colors -- This is where things get tricky. I am storing my colors as structs of three floats, and an integer flag (related to the posterization algorithm specifically). Everyhting is going well, except for one thing... [actual question] I can't figure out how to add pointers to an NSMutableArray! I know how to add an object, but adding a pointer to a struct seems to be more difficult -- I do not want NSMutableArray dereferencing my pointer and treating the struct as some sort of strange object. I want NSMutableArray to add the pointer its self to its collection. How do I go about doing this? Thanks in advance, G

    Read the article

  • Google Chart Number formatting

    - by MizAkita
    I need to format my pie and column charts to show the $ and comma in currency format ($###,###) when you hover over the charts. Right now, it is displaying the number and percentage but the number as #####.## here is my code. Any help would be appreciated. // Load the Visualization API and the piechart package. google.load('visualization', '1.0', {'packages':['corechart']}); // Set a callback to run when the Google Visualization API is loaded. google.setOnLoadCallback(drawChart); var formatter = new google.visualization.NumberFormat({ prefix: '$' }); formatter.format(data, 1); var options = { pieSliceText: 'value' }; // Callback that creates and populates a data table, // instantiates the pie chart, passes in the data and // draws it. function drawChart() { // REVENUE CHART - Create the data table. var data4 = new google.visualization.DataTable(); data4.addColumn('string', 'Status'); data4.addColumn('number', 'In Thousands'); data4.addRows([ ['Net tution & Fees', 213.818], ['Auxiliaries', 30.577], ['Government grants/contracts', 39.436], ['Private grants/gifts', 39.436], ['Investments', 10.083], ['Clinics', 14.353], ['Other', 5.337] ]); // EXPENSES CHART - Create the data table. var data5 = new google.visualization.DataTable(); data5.addColumn('string', 'Status'); data5.addColumn('number', 'Amount'); data5.addRows([ ['Instruction', 133.868], ['Sponsored Progams', 34.940], ['Auxiliaries', 30.064], ['Academic Support', 25.529], ['Depreciation & amortization', 18.548], ['Student Services', 22.626], ['Plant operations & maintenance', 18.105], ['Fundraising', 13.258], ['Geneal Administration', 11.628], ['Interest', 6.846], ['Student Aid', 1.886], ]); // ENDOWMENT CHART - Create the data table. var data6 = new google.visualization.DataTable(); data6.addColumn('string', 'Status'); data6.addColumn('number', 'In Millions'); data6.addRows([ ['2010', 178.7], ['2011', 211.693], ['2012', 199.3] ]); // Set REVENUE chart options var options4 = { is3D: true, fontName: 'Arial', colors:['#AFD8F8', '#F6BD0F', '#8BBA00', '#FF8E46', '#008E8E', '#CCCCCC', '#D64646', '#8E468E'], 'title':'', 'width':550, 'height':250}; // Set EXPENSES chart options var options5 = { is3D: true, fontName: 'Arial', colors:['#AFD8F8', '#F6BD0F', '#8BBA00', '#FF8E46', '#008E8E', '#CCCCCC', '#D64646', '#8E468E'], 'title':'', 'width':550, 'height':250}; // Set ENDOWMENT chart options var options6 = { is3D: true, fontName: 'Arial', colors:['#AFD8F8', '#F6BD0F', '#8BBA00', '#FF8E46', '#008E8E', '#CCCCCC', '#D64646', '#8E468E'], 'title':'', 'width':450, 'height':250}; // Instantiate and draw our chart, passing in some options. var chart4 = new google.visualization.PieChart(document.getElementById('chart_div4')); chart4.draw(data4, options4); var chart5 = new google.visualization.PieChart(document.getElementById('chart_div5')); chart5.draw(data5, options5); var chart6 = new google.visualization.ColumnChart(document.getElementById('chart_div6')); chart6.draw(data6, options6);}

    Read the article

  • Generate Color Gradient in C#

    - by Ngu Soon Hui
    My question here is similar to the question here, except that I am working with C#. I have two colors, and I have a predefine steps. How to retrieve a list of Colors that are the gradients between the two? This is an approach that I tried, which didn't work: int argbMax = Color.Chocolate.ToArgb(); int argbMin = Color.Blue.ToArgb(); var colorList = new List<Color>(); for(int i=0; i<size; i++) { var colorAverage= argbMin + (int)((argbMax - argbMin) *i/size); colorList.Add(Color.FromArgb(colorAverage)); } If you try the above code, you will find that a gradual increase in argb doesn't correspond to a visual gradual increase in the color. Any idea on this?

    Read the article

  • How to display configurable product in each color in Magento product listing?

    - by Thomas
    I have a configurable product which is available in many different colors and sizes. I want the configurable product to appear once for every color. My idea is to assign one simple product of the configurable product in every color to the category of the configurable product. Then I want to change the listing, so that the (colored) simple product links to it's master product (the configurable one). The other way would be, to just assign the configurable product to a category and then list it multiple times with different colors. But I think this would be to complicated.

    Read the article

  • Separating an Array into a comma seperated string with quotes

    - by user548744
    I'm manually building an SQL query where I'm using an Array in the params hash for an SQL IN statement, like: ("WHERE my_field IN('blue','green','red')"). So I need to take the contents of the array and output them into a string where each element is single quoted and comma seperated (and with no ending comma). So if the array was: my_array = ['blue','green','red'] I'd need a string that looked like: "'blue','green','red'" I'm pretty new to Ruby/Rails but came up with something that worked: if !params[:colors].nil? @categories_array = params[:colors][:categories] @categories_string ="" for x in @categories_array @categories_string += "'" + x + "'," end @categories_string.chop! #remove the last comma end So, I'm good but curious as to what a proper and more consise way of doing this would look like? Thanks

    Read the article

  • how to view different file extension in different color ib terminal of mac leopard.

    - by Suren
    Hi, I am trying to get colored listing of directories and files as per their extension after ls command. Recently I switched over to mac leopard from Linux. There is no .bashrc file in my home directory, so I created one with the following contents.This is doing only a bit what I want (only directories as colored). I also want to view files with different extension in different colors. What and where to add? thanx in advance :) # Define how Bash prompt looks like: # # User @ Host - working dir #export PS1='\u@\h\w$ ' export PS1='\u@\h\w: ' # Cli Colors export CLICOLOR=1 # use blue for dir’s export LSCOLORS=exfxcxdxbxegedabagacad # Alias # # alias ls='ls -al'

    Read the article

  • Mod_rewrite with multiple variables

    - by Andrei
    Hello, I'm using a PHP script that dynamically generates transparent PNGs for use as CSS backgrounds from a query string that takes RGBa and HSLa values. The original script can be found here, I've only added HSLa support. Because background URLs with PHP query strings aren't very pretty, and because it seems to break the IE 6 transparent PNG hack, I thought of using mod_rewrite to allow the script to be called when a .png with this syntax is called : /assets/colors/h[0-360 value]_s[0-100 value]_l[0-100 value]_a[0-100 value].png which would be rewritten to : /assets/colors.php?h=[0-360 value]&s=[0-100 value]&l=[0-100 value]&a=[0-100 value] Here's the issues I'm encountering : passing multiple variables with mod_rewrite using an underscore as a delimiter I know this could be done by passing a single variable and then exploding it in the PHP script, however I would prefer it to be done by Apache. Thanks in advance and if anyone wants my HSLa enabled version of the script just ask. Anyway I recommend you check it out on it's author's website.

    Read the article

  • how many color combinations in a 24 bit image

    - by numerical25
    I am reading a book and I am not sure if its a mistake or I am misunderstanding the quote. It reads... Nowadays every PC you can buy has hardware that can render images with at least 16.7 million individual colors. Rather than have an array with thousands of color entries, the images instead contain explicit color values for each pixel. A 24-bit display, of course, uses 24 bits, or 3 bytes per pixel, for color information. This gives 1 byte, or 256 distinct values each, for red, green, and blue. This is generally called true color, because 256^3 (16.7 million) He says 1 byte is equal to 256 distinct values. 1 byte = 8 bits. 8^2 bits = 64 distinct colors right ?? It's not adding up right to me. I know it might be something simple to understand, but I don't understand.

    Read the article

  • how many color combinations in a 24 bit image

    - by numerical25
    I am reading a book and I am not sure if its a mistake or I am misunderstanding the quote. It reads... Nowadays every PC you can buy has hardware that can render images with at least 16.7 million individual colors. Rather than have an array with thousands of color entries, the images instead contain explicit color values for each pixel. A 24-bit display, of course, uses 24 bits, or 3 bytes per pixel, for color information. This gives 1 byte, or 256 distinct values each, for red, green, and blue. This is generally called true color, because 256^3 (16.7 million) He says 1 byte is equal to 256 distinct values. 1 byte = 8 bits. 8^2 bits = 64 combinations of colors right ?? It's not adding up right to me. I know it might be something simple to understand, but I don't understand.

    Read the article

  • Plotting a grouped 2 dimensional vector in MATLAB

    - by Hossein
    I am trying to make a plot of a 2-dimensional vector (2D Plot). But I don't want all the datapoints to have the same color on the plot. Each datapoint corresponds to a group. I want to have different colors for each group of datapoints. class=[1 3 2 5 2 5 1 3 3 4 2 2 2] says each datapoint belongs to which group X=[x1,y1;x2,y2;x3,y3;.....] the number of these datapoints are the same as the number of elements in the class vector. Now I want to plot these based on colors.

    Read the article

  • Returning the Name of a column header

    - by Jason Kelly
    I need your help, Given the html table below, how can I create a javascript function that will, at the click of a mouse, alert me the name of the column header? Ie. if I click on the COLORS header, a javascript box will popup and alert("COLORS")? <html> <head> </head> <body> <table border="1" cellspacing="1" width="500"> <tr> <td>FRUITS</td> <td>COLORS</td> <td>VEGGIES</td> <td>NUMBERS</td> </tr> <tr> <td>apples</td> <td>red</td> <td>carrots</td> <td>123</td> </tr> <tr> <td>oranges</td> <td>blue</td> <td>celery</td> <td>456</td> </tr> <tr> <td>pears</td> <td>green</td> <td>brocoli</td> <td>789</td> </tr> <tr> <td>mangos</td> <td>yellow</td> <td>lettuce</td> <td>098</td> </tr> </table> </body> </html>

    Read the article

  • Indexing a method return (depending on Internationalization)

    - by Hedde
    Consider a django model with an IntegerField with some choices, e.g. COLORS = ( (0, _(u"Blue"), (1, _(u"Red"), (2, _(u"Yellow"), ) class Foo(models.Model): # ...other fields... color = models.PositiveIntegerField(choices=COLOR, verbose_name=_(u"color")) My current (haystack) index: class FooIndex(SearchIndex): text = CharField(document=True, use_template=True) color = CharField(model_attr='color') def prepare_color(self, obj): return obj.get_color_display() site.register(Product, ProductIndex) This obviously only works for keyword "yellow", but not for any (available) translations. Question: What's would be a good way to solve this problem? (indexing method returns based on the active language) What I have tried: I created a function that runs a loop over every available language (from settings) appending any translation to a list, evaluating this against the query, pre search. If any colors are matched it converts them backwards into their numeric representation to evaluate against obj.color, but this feels wrong.

    Read the article

  • Free icons for mobile applications. Where?

    - by Geltrude
    I know that in the sdk folders I can find some (not very well grouped, imho) icon. But, there is a site online specialized that let you download free icons useful for mobile app? Ie world flags, up, down... save, revert..., next..., play, stop..., etc. It would be more appriciated also if you can find these sets in many different colors, and in 2 or 3 sizes (32x32, 64x64, etc.). Have a nice day (ot. Especially my mom - her 62 birthday :-) Edit: those are all good sites, but to green-check the answer I need a small set with the common icons (I think moreabout 50-70 icons), in many different colors and in 2 or 3 different sizes (for lo-mid-hi definition devices). - If a so done site exists for free :-)

    Read the article

  • Java Applet : Nested Loops color change

    - by Bader
    Hello I have like a table to make a nested loop in Java applet , during this loop i should change the colors like the picture said. now i successed to make the table but i cannot change the colors because every time i try a forumla , it doesn't work. Here is my code int x = 63; for (int r=1; r<=10;r++) { Color C = new Color(0,10 +(x * 2),0); for (int c=0; c<=4; c++) { Color C2 = new Color(10 + (x * 2) ,0,0); g.setColor(C2); Font F = new Font("Arial",Font.BOLD, 24); g.setFont(F); g.drawString("Hello",10 + ( c * 60), r * 25 ); } } what should i do to make it work ?

    Read the article

  • css3 nth child question

    - by JCHASE11
    Hello. I am designing a 960px wide layout with an unordered list. Each list item is 240px wide, so 4 list items fit horizontally in a row. I have about 20 rows on the page.... I want every other list item to have a background of #ececec, so my css would be: ul li:nth-child(2n+2){ background-color:#ececec; } This works. The only problem is because there are 4 items in a row (an even #), the next row would be identical, thus rendering background colors on every 1st and 3rd list items in a row. This is not the effect I am looking to achieve. I want the background colors to alternate, creating a grid-like effect. What is the correct css to do so (think a checker board). Thanks!

    Read the article

  • Plotting a grouped 2 dimensional vevtor in MATLAB

    - by Hossein
    Hi, I am trying to make a plot of a 2-Dimensional vector(2D Plot).But I don't want all the datapoints to have the same color on the plot.Each datapoint corresponds to a group.I want to have different colors for each group of datapoints. class=[1 3 2 5 2 5 1 3 3 4 2 2 2] says each datapoint belongs to which group X=[x1,y1;x2,y2;x3,y3;.....] the number of thes datapoints are the same as the number of elements in th class vector. Now I want to plot these based on colors. Can someone help me? Thanks

    Read the article

  • what is the relation between actual pixels and html(css) pixels in blackberry?

    - by HelpMeToHelpYou
    I am implementing one phonegap application. here everything going fine but when i am talking device specifications like 1)BlackBerry Bold Touch 9900 Screen specifications are as following Body Dimensions 115 x 66 x 10.5 mm (4.53 x 2.60 x 0.41 in) Weight 130 g (4.59 oz) Keyboard QWERTY Display Type TFT capacitive touchscreen, 16M colors Size 640 x 480 pixels, 2.8 inches (~286 ppi pixel density) But when i test following function in java script function findScreenSize() { alert("width:"+window.innerWidth +"Height:"+ window.innerHeight); } it displaying SIZE width : 356 Height : 267 (356 x 267) 2)BlackBerry Bold Touch 9930 Screen specifications are as following Body Dimensions 115 x 66 x 10.5 mm (4.53 x 2.60 x 0.41 in) Weight 130 g (4.59 oz) Keyboard QWERTY - Touch-sensitive controls Display Type TFT capacitive touchscreen, 16M colors Size 640 x 480 pixels, 2.8 inches (~286 ppi pixel density) then i run same javaScript function i got following output it displaying SIZE width : 417 Height : 313 (417 x 313) why it is behaving like this ? Can anybody know relation between core pixel and HTML pixel please give answer

    Read the article

  • Changing href atribute

    - by ferrucio
    In need to change a part of this href: <a href="media/xxxxx-yyy.jpg">large pic</a> I have some designs, and some colors, xxxxx stands for designnumber and yyy for colornumber, when one of the designs is clicked or one of the colors the href should change according to the value: <a href="#">design1</a> <a href="#">design2</a> <a href="#">design3</a> <a href="#">color1</a> <a href="#">color2</a> <a href="#">color3</a> Is there any way to do this with JQuery?

    Read the article

  • php: parsing and converting array structure

    - by mwb
    I need to convert one array structure into another array structure. I hope someone will find it worthy their time to show how this could be done in a simple manner. It's a little above my array manipulation skills. The structure we start out with looks like this: $cssoptions = array( array( 'group' => 'Measurements' , 'selector' => '#content' , 'rule' => 'width' , 'value' => '200px' ) // end data set , array( 'group' => 'Measurements' , 'selector' => '#content' , 'rule' => 'margin-right' , 'value' => '20px' ) // end data set , array( 'group' => 'Colors' , 'selector' => '#content' , 'rule' => 'color' , 'value' => '#444' ) // end data set , array( 'group' => 'Measurements' , 'selector' => '.sidebar' , 'rule' => 'margin-top' , 'value' => '10px' ) // end data set ); // END $cssoptions It's a collection of discreet datasets, each consisting of an array that holds two key = value pairs describing a 'css-rule' and a 'css-rule-value'. Further, each dataset holds a key = value pair describing the 'css-selector-group' that the 'css-rule' should blong to, and a key = value pair describing a 'rule-group' that should be used for structuring the rendering of the final css into a neat css code block arranged by the kind of properties they describe (colors, measurement, typography etc..) Now, I need to parse that, and turn it into a new structure, where the: 'rule' => 'rule-name' , 'value' => 'value-string' for each dataset is converted into: 'rule-name' => 'value-string' ..and then placed into a new array structure where all 'rule-name' = 'value-string' pairs should be aggregated under the respective 'selector-values' Like this: '#content' => array( 'width' => '200px' , 'margin-right' => '20px' ) // end selecor block ..and finally all those blocks should be grouped under their respective 'style-groups', creating a final resulting array structure like this: $css => array( 'Measurements' => array( '#content' => array( 'width' => '200px' , 'margin-right' => '20px' ) // end selecor block , '.sidebar' => array( 'margin-top' => '10px' ) // end selector block ) // end rule group , 'Colors' => array( '#content' => array( 'color' => '#444' ) // end selector block ) // end rule group ); // end css

    Read the article

  • Rails modeling for a user

    - by Trevor Hartman
    When building a rails app that allows a User to login and create data, is it best to setup a belongs_to :user association on every single model? For example, let's say a user can create Favorites, Colors and Tags. And let's say Favorites has_many :tags and Colors also has_many :tags. Is it still important for Tags to belong_to :user assuming the User is the only person who has authority to edit those tags? And a similar question along the same lines: When updating data in FavoritesController, I've come to the conclusion that you perform CRUD operations by always doing something like User.favorites.find(params[:id].update_attributes(param[:favorite]) so that they can definitely only update models that belong to them. Right?

    Read the article

  • How can I write fast colored output to Console?

    - by Statement
    Hello world! I want to learn if there is another (faster) way to output text to the console application window using C# .net than with the simple Write, BackgroundColor and ForegroundColor methods and properties? I learned that each cell has a background color and a foreground color, and I would like to cache/buffer/write faster than using the mentioned methods. Maybe there is some help using the Out buffer, but I don't know how to encode the colors into the stream, if that is where the color data resides. This is for a retrostyle textbased game I am wanting to implement where I make use of the standard colors and ascii characters for laying out the game. Please help :)

    Read the article

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