change the angle of pixel

by eldo » Tue, 15 Sep 2009 16:25:29 GMT


Sponsored Links
 Hi all ,
   could someone help me with the below given code snippet.awarning
persists in my application saying that vriable GY is never read . This
warning results in an incorrect output . Could someone help me know if
there is a change in the calculations to be done .


int RY, GY, BY, RYY, GYY, BYY, R, G, B, Y;
        double angle = (3.14159d * (double)deg) / 180.0d;
        int S = (int)(256.0d * Math.sin(angle));
        int C = (int)(256.0d * Math.cos(angle));

        for (int y = 0; y < pich; y++)
        for (int x = 0; x < picw; x++)
            {
            int index = y * picw + x;
            int r = (pix[index] >> 16) & 0xff;
            int g = (pix[index] >> 8) & 0xff;
            int b = pix[index] & 0xff;
            RY = (70 * r - 59 * g - 11 * b) / 100;
            GY = (-30 * r + 41 * g - 11 * b) / 100;
            BY = (-30 * r - 59 * g + 89 * b) / 100;
            Y = (30 * r + 59 * g + 11 * b) / 100;
            RYY = (S * BY + C * RY) / 256;
            BYY = (C * BY - S * RY ) / 256;
            GYY = (-51 * RYY - 19 * BYY) / 100;
            R = Y + RYY;
            R = (R < 0) ? 0 : ((R > 255) ? 255 : R);
            G = Y + GYY;
            G = (G < 0) ? 0 : ((G > 255) ? 255 : G);
            B = Y + BYY;
            B = (B < 0) ? 0 : ((B > 255) ? 255 : B);
            pix[index] = 0xff000000 | (R << 16) | (G << 8) | B;
            }

how can i get rid of the warning GY unread variable
--~--~---------~--~----~------------~-------~--~----~



change the angle of pixel

by Yusuf Saib (T-Mobile USA) » Wed, 16 Sep 2009 01:14:04 GMT


 GY is set on the line that has "GY =" but not used on the right-hand
side of the equation anywhere after that. There is no code that says,
for example, "B = GY + Y".



Yusuf Saib
Android
T  Mobile stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.





--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


change the angle of pixel

by eldo jacob » Fri, 18 Sep 2009 13:53:51 GMT


 Thank You  , i got the point but i needed to know whether the formulas used
has some more code to be added , so that the each pixel is rotated
accordingly .

On Tue, Sep 15, 2009 at 10:43 PM, Yusuf Saib (T-Mobile USA) <





--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Contract Opportunity for SQL Database Developer @ Little Rock, AR

Dear Partner's,



Please send me resume on mehroz.k...@aequor.com*. *Only locals or nearby
states please*.
*



Let me know if you are interest on the below opening:



*Title:* SQL Database Developer

*Location: *Little Rock, AR

*Duration:* 6 Months

*Rates : *$40/-hr


*Education*:

 4 year college degree or equivalent technical study or advanced degree

**

*Role Description:*

The right candidate will have strong SQL Server 2005/2008 experience with
specific SSIS and SSAS knowledge and understanding with 3+ years of OLAP
development experience (cube design, fact, dimension structure, Data Mart
development, etc).



 Years of Relevant Experience: 5 to 11 years

* *

*Required Skills:*

SQL 2000, SQL 2008, SQL Server Integration Services (SSIS), SQL Server
Analysis Services (SSAS), SQL Server Reporting Services (SSRS), Experience
in designing and developing Data Mart strategies, Experience in designing
and developing Data Warehouse strategies



Mohd. Mehroz Khan



Recruitment & Sourcing

Aequor Technologies

Tel: 732-579-6333 Ext-105

Email: 
mehroz.k...@aequor.com<https://146.145.136.35/owa/redir.aspx?C=49d76e22e94142538848a25d1c983f00&URL=mailto%3amehroz.khan%40aequor.com>

Website: 
www.aequor.com<https://146.145.136.35/owa/redir.aspx?C=49d76e22e94142538848a25d1c983f00&URL=http%3a%2f%2fwww.aequor.com%2f>

-- 

2. One day sale made my paid app free, now I cannot revert!

My app had a one-day sale on all platforms and app stores.  The price
went from 2.99 to free for just today, but now that the sale is over,
I need to revert the price back to 2.99.  The bad news is, the
developer console will not let me change it!  I have to pull the app
until I can get this resolved.  What can I do?

-- 

3. How to implement your own LocationProvider

4. Refresh Gallery Thumbnail view

5. I'm really impressed...

6. A hand of cards

7. ACTION_IMAGE_CAPTURE intent