Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. if(transformedPic != null)
  2. {
  3. int Height = transformedPic.GetLength(0);
  4. int Width = transformedPic.GetLength(1);
  5. Color[,] Temp = new Color[Height, Width];
  6.  
  7. for (int i = 0; i < Height; i++)
  8. {
  9. for (int j = 0; j < Width; j++)
  10. {
  11. Temp[i, j] = transformedPic[i, j];
  12. }
  13. }
  14.  
  15. transformedPic = new Color[Height, Width * 2];
  16.  
  17. for (int i = 0; i < Height; i++)
  18. {
  19. for (int j = 0; j < Width; j++)
  20. {
  21. transformedPic[i, j] = Temp[i, j];
  22. transformedPic[i, Width * 2 - 1 - j] = Temp[i, j];
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement