Results 1 to 4 of 4
  1. #1
    Track13 is offline Member
    Join Date
    Nov 2012
    Posts
    11
    Rep Power
    0

    Default Need help w/ question based on Copying Pixels

    A Picture has H rows of Pixels, W columns of Pixels, and W is an even number, like W is 2N. Here, N is the whole number that is exactly 1/2 of W. How many pixels are copied when the Picture is mirrored along the vertical line through its middle?

    I know the equation is (Width * Height) / 2
    I wrote a program to keep count of all the pixels.
    I tested different pictures to see if I would get the same answer but, I didn't.
    Clearly each picture has different number of pixels.
    Am I on the right track with the question?

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,042
    Blog Entries
    7
    Rep Power
    23

    Default Re: Need help w/ question based on Copying Pixels

    All the pixels in the image are copied; try it with a minimal image: 1 row by 2 columns; both pixels are swapped.

    kind regards,

    Jos
    The only person who got everything done by Friday was Robinson Crusoe.

  3. #3
    Track13 is offline Member
    Join Date
    Nov 2012
    Posts
    11
    Rep Power
    0

    Default Re: Need help w/ question based on Copying Pixels

    So I should add another loop to through the columns again?

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,042
    Blog Entries
    7
    Rep Power
    23

    Default Re: Need help w/ question based on Copying Pixels

    Quote Originally Posted by Track13 View Post
    So I should add another loop to through the columns again?
    Why?

    kind regards,

    Jos
    The only person who got everything done by Friday was Robinson Crusoe.

Similar Threads

  1. help with some pixels
    By HelloWorld1234 in forum New To Java
    Replies: 13
    Last Post: 07-09-2012, 12:58 AM
  2. Replies: 2
    Last Post: 04-26-2012, 05:59 AM
  3. Replies: 1
    Last Post: 03-13-2012, 01:58 AM
  4. i need an example of JSR179 ((Location based Ser)implementation for CDC based device
    By talk_to_vivekmishra in forum CDC and Personal Profile
    Replies: 3
    Last Post: 12-30-2010, 11:07 AM
  5. array-based implementation question
    By intelli in forum New To Java
    Replies: 1
    Last Post: 04-18-2009, 05:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •