none
Transpose an Ascii Picture in C# (Method?) RRS feed

  • Question

  • Im looking for a method to transpose an Ascii Picture in C#.

    The Solution should effect, that the lenght will be the height and the other round.

    Im glad for every help! If you have to know some other details, please let me know.

    Wednesday, March 13, 2019 6:09 PM

All replies

  • Where is the picture stored? Do you have the characters in a rectangular array? If that's the case, you can write two nested loops reading the rows and columns of the source array and writing them to the columns and rows of the target array.

    Note however that the new transposed picture might not look as good as the original, because the letters themselves will not "rotate" around their center. This will be OK if it is a large picture that simply relies in the "density" of characters, but it will not look good if it is a small picture that depends on the shapes of the characters.

    Wednesday, March 13, 2019 7:00 PM
    Moderator
  • Hi

    Thank you for posting here.

    << I'm looking for a method to transpose an Ascii Picture in C#.

    For your question, I want to confirm what is the meaning of transpose. Is it rotation or conversion?

    We are waiting for your update.


    Best regards,                                                             

    Jack

     


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Thursday, March 14, 2019 6:41 AM
    Moderator