Results 1 to 7 of 7

Thread: Resize A bitmap

  1. #1
    Join Date
    Nov 2007
    Location
    Nowhereville
    Posts
    1,155
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default Resize A bitmap

    Is there a way to resize a bitmap or screenshot that i save from a client?

    Cut em2 it
    Formerly known as Cut em2 it

  2. #2
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Draw the bitmap on a canvas with the wanted sx, sy ex, ey (s = start e = end) and get the bitmap from the canvas

  3. #3
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    During runtime? Yea probably. Kaitnieks did that crazy thing with the bulldozer running all over the screen in different sizes.

    If not during runtime just open photoshop and use resize image check constrain proportions.

    You could always make a delphi plugin pretty easily.

  4. #4
    Join Date
    Nov 2007
    Location
    Nowhereville
    Posts
    1,155
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Yes true, I might do that when i get the time. It doesn't have to be fast, it just has to work. But I think I misspoke. I want to take a part of a bitmap out and save it I dont need to resize it, just only have part of it. Is that possible?
    Formerly known as Cut em2 it

  5. #5
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Cut em2 it View Post
    Yes true, I might do that when i get the time. It doesn't have to be fast, it just has to work. But I think I misspoke. I want to take a part of a bitmap out and save it I dont need to resize it, just only have part of it. Is that possible?
    Of you mean crop? Yea that would be easy, do the canvas thing like Zyt3x said

  6. #6
    Join Date
    Nov 2007
    Location
    Nowhereville
    Posts
    1,155
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Okay, I think I can do that, but how do I save the canvas as a bitmap?
    Formerly known as Cut em2 it

  7. #7
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    2,851
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Cut em2 it View Post
    Okay, I think I can do that, but how do I save the canvas as a bitmap?
    SCAR Code:
    program New;
    var
      OrgBMP: Integer;
      NewBMP: Integer;
     
    begin
      SafeCopyCanvas(GetBitmapCanvas(OrgBMP), GetBitmapCanvas(NewBMP), 4, 4, 16, 16, 0, 0, 12, 12);
      SaveBitmap(NewBMP, AppPath + 'IamTheNewBitmap.bmp');
    end.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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