Sponsored Content
Top Forums Programming Xlib - Rotation and interpolation of pixmap - Performance problems Post 302909125 by mghis on Monday 14th of July 2014 04:29:24 PM
Old 07-14-2014
Thank you, migurus, for your reply.
It did speed it up a bit, but I noticed the problem is mainly in the XAllocColor() call. In fact, if I remove that call and always put a black pixel, (still calculating the values), the program runs at less than half a second per rotation.

However I really don't know to get rid of XAllocColor().

I am writing pixels to an XImage. Is there a way to access directly the RGB values of each pixel?
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

variable interpolation

I've become obsessed with trying to get this to work. As of yet, I am unable to figure it out. Unfortunately, I don't have Linux or UNIX available when I get home. Anyone have tips for me on how I can pass param1 to ID via use of COUNTER and loop? thx. LIMIT=6 param1="999999999" export... (0 Replies)
Discussion started by: egkumpe
0 Replies

2. Programming

problems with drawing in x using xlib

Hi all, I'm currently learning xlib and I've encountered a bizarre mistake: function calls such as XDrawPoint, XDrawLine, etc., don't seem to work; a blank window with nothing in is appears. I believe this has something to do with the window manager I use, fluxbox. After checking the code and... (0 Replies)
Discussion started by: hydronium
0 Replies

3. AIX

Performance and paging problems

... a disk drive to be 100% busy? hdisk0 100.0 1.3K 342.7 1.3K 22.0 PgspIn 651 % Noncomp 75.5 hdisk1 100.0 1.3K 320.2 1.2K 20.0 PgspOut 6 % Client 75.5 It's really slowing down performance on my system and I would like to know what is causing this. ... (2 Replies)
Discussion started by: bbbngowc
2 Replies

4. SCO

CPU Performance Problems on VMWARE

hi We have migrated SCO 5.0.6 into ESX4, but the VM eats 100% of the virtual CPU. Here is top print from the SCO VM: last pid: 16773; load averages: 1.68, 1.25, 0.98 02:08:41 79 processes: 75 sleeping, 2 running, 1 zombie, 1 onproc CPU states: 0.0% idle, 17.0% user,... (7 Replies)
Discussion started by: ccc
7 Replies

5. AIX

AIX 5.3 performance problems

Hello, I encounter some performance issues on my AIX 5.3 server running in a LPAR on a P520. How do I investigate performance issues in AIX. Is there any kind of procedure that takes me to the steps to investigate my server and find the sub systems that is causing the issues? The performance... (1 Reply)
Discussion started by: petervg
1 Replies

6. Shell Programming and Scripting

Interpolation using awk

Hi all, Consider I have a text file containing: 1003 60 1005 80 1100 110 Based on that file I need to create another file which is containing value from 1001 till 1100 which is a linear interpolation between two point (for 1004; 1006;1007 until 1109) and extrapolation based on 2... (7 Replies)
Discussion started by: ardy_yana
7 Replies

7. Shell Programming and Scripting

Hi ! whether it is possible to do interpolation in scripting...

Hi ! Experts... I just wanted to know whether it is possible in scripting...to do interpolation.... if so....have a look on my data file I need temperature and salinity value with a bin size of 0.5 m output looks somewhat like this dep temp sal 0.5 25 0.077 1 25 ... (12 Replies)
Discussion started by: nex_asp
12 Replies

8. Shell Programming and Scripting

An interpolation between two files

Dear all, I always appreciate your help. I am an electrical engineer. I am using a tool for timing analysis of a circuit. I would like to interpolate results from two timing reports at different voltages (0.945V and 0.78V). If voltage is decreased, data arrival time is increased. For... (4 Replies)
Discussion started by: jypark22
4 Replies

9. What is on Your Mind?

MySQL Performance Problems

Just restarted MySQL a few times. There seems to be a problem with MySQL performance because one table (our man page table) is too large and I need to move that table to a new database and out of the main forums DB. That table is over 7 GB, bigger than the rest of the DB combined: ... (14 Replies)
Discussion started by: Neo
14 Replies
XcmsAllocColor(3)						  XLIB FUNCTIONS						 XcmsAllocColor(3)

NAME
XcmsAllocColor, XcmsAllocNamedColor - allocate colors SYNTAX
Status XcmsAllocColor(Display *display, Colormap colormap, XcmsColor *color_in_out, XcmsColorFormat result_format); Status XcmsAllocNamedColor(Display *display, Colormap colormap, char *color_string, XcmsColor *color_screen_return, XcmsColor *color_exact_return, XcmsColorFormat result_format); ARGUMENTS
display Specifies the connection to the X server. colormap Specifies the colormap. color_exact_return Returns the color specification parsed from the color string or parsed from the corresponding string found in a color-name data- base. color_in_out Specifies the color to allocate and returns the pixel and color that is actually used in the colormap. color_screen_return Returns the pixel value of the color cell and color specification that actually is stored for that cell. color_string Specifies the color string whose color definition structure is to be returned. result_format Specifies the color format for the returned color specification. DESCRIPTION
The XcmsAllocColor function is similar to XAllocColor except the color can be specified in any format. The XcmsAllocColor function ulti- mately calls XAllocColor to allocate a read-only color cell (colormap entry) with the specified color. XcmsAllocColor first converts the color specified to an RGB value and then passes this to XAllocColor. XcmsAllocColor returns the pixel value of the color cell and the color specification actually allocated. This returned color specification is the result of converting the RGB value returned by XAlloc- Color into the format specified with the result_format argument. If there is no interest in a returned color specification, unnecessary computation can be bypassed if result_format is set to XcmsRGBFormat. The corresponding colormap cell is read-only. If this routine returns XcmsFailure, the color_in_out color specification is left unchanged. XcmsAllocColor can generate a BadColor errors. The XcmsAllocNamedColor function is similar to XAllocNamedColor except that the color returned can be in any format specified. This func- tion ultimately calls XAllocColor to allocate a read-only color cell with the color specified by a color string. The color string is parsed into an XcmsColor structure (see XcmsLookupColor), converted to an RGB value, and finally passed to XAllocColor. If the color name is not in the Host Portable Character Encoding, the result is implementation-dependent. Use of uppercase or lowercase does not matter. This function returns both the color specification as a result of parsing (exact specification) and the actual color specification stored (screen specification). This screen specification is the result of converting the RGB value returned by XAllocColor into the format speci- fied in result_format. If there is no interest in a returned color specification, unnecessary computation can be bypassed if result_format is set to XcmsRGBFormat. If color_screen_return and color_exact_return point to the same structure, the pixel field will be set correctly, but the color values are undefined. XcmsAllocNamedColor can generate a BadColor errors. DIAGNOSTICS
BadColor A value for a Colormap argument does not name a defined Colormap. SEE ALSO
XcmsQueryColor(3), XcmsStoreColor(3) Xlib - C Language X Interface X Version 11 libX11 1.3.2 XcmsAllocColor(3)
All times are GMT -4. The time now is 02:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy