Re: Tiled Images
From: Bob Powell [MVP] (bob_at__spamkiller_bobpowell.net)
Date: 02/10/05
- Next message: emars_at_forwild.umass.edu: "Very Large Bitmaps"
- Previous message: Jake: "Re: Tiled Images"
- In reply to: Jake: "Re: Tiled Images"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 10 Feb 2005 20:51:46 +0100
Take a look at the beginners guide to GDI+. It explains how to select little
bits of an image. Also the GDI+ FAQ article on drawing images.
-- Bob Powell [MVP] Visual C#, System.Drawing Find great Windows Forms articles in Windows Forms Tips and Tricks http://www.bobpowell.net/tipstricks.htm Answer those GDI+ questions with the GDI+ FAQ http://www.bobpowell.net/faqmain.htm All new articles provide code in C# and VB.NET. Subscribe to the RSS feeds provided and never miss a new article. "Jake" <Jake@discussions.microsoft.com> wrote in message news:99279AD4-B344-488F-9214-27275605FC9E@microsoft.com... > Basicly what i'm trying to do is make a tile based sidescroller game. I > found > a cool app called Tile Studio that helps you make the tiles and > everything. > So I now have a bmp with all the tiles, and now I need a way to load them > into my app so I can use them. So if there is anyway to grab a region from > a > bmp and put it into an Image object, that would be awesome. If not, I'll > have > to figure something else out. Just trying to do it without haveing to save > each tile as a different file. If you had 100 different tiles, then you'd > have to deal with 100 different files. Just trying to stay away from that. > Thanks for your help. > > :// Jake > > "Bob Powell [MVP]" wrote: > >> You can add images to an imagelist dynamically. You could maintain a list >> of >> images in a configuration file and distribute image tiles with the >> application or replace them later with new ones. >> >> You mention WinAmp skins. Are you creating a skinning application? >> >> -- >> Bob Powell [MVP] >> Visual C#, System.Drawing >> >> Find great Windows Forms articles in Windows Forms Tips and Tricks >> http://www.bobpowell.net/tipstricks.htm >> >> Answer those GDI+ questions with the GDI+ FAQ >> http://www.bobpowell.net/faqmain.htm >> >> All new articles provide code in C# and VB.NET. >> Subscribe to the RSS feeds provided and never miss a new article. >> >> >> >> >> >> "Jake" <Jake@discussions.microsoft.com> wrote in message >> news:5813849B-BA0B-49C3-A3F1-064E7B8BE55A@microsoft.com... >> > Good suggestion, but I would like to be able to switch out the images >> > at >> > runtime (ie. without re-compileing). After I posted, I looked through >> > the >> > FAQ >> > you have on your sig and found the Regions. I dled the code and it >> > looks >> > like >> > this may work. If you can offer anything else, please do. I'm all >> > ears... >> > :) >> > >> > thanks >> > >> > :// Jake >> > >> > "Bob Powell [MVP]" wrote: >> > >> >> For images of this size the ImageList is the ideal solution. You can >> >> save >> >> the tiles as individual images and then load them into an imagelist at >> >> design time. The resulting resource will contain all your tiles at >> >> their >> >> desired size in a form that you can access by an index. >> >> >> >> If this doesn't work for you I have more complex solutions. >> >> >> >> -- >> >> Bob Powell [MVP] >> >> Visual C#, System.Drawing >> >> >> >> Find great Windows Forms articles in Windows Forms Tips and Tricks >> >> http://www.bobpowell.net/tipstricks.htm >> >> >> >> Answer those GDI+ questions with the GDI+ FAQ >> >> http://www.bobpowell.net/faqmain.htm >> >> >> >> All new articles provide code in C# and VB.NET. >> >> Subscribe to the RSS feeds provided and never miss a new article. >> >> >> >> >> >> >> >> >> >> >> >> "Jake" <Jake@discussions.microsoft.com> wrote in message >> >> news:918ED940-D063-40F7-8C5D-D5766E1FA515@microsoft.com... >> >> > Not quite sure how to ask this. I'm new to graphics programming. I'm >> >> > trying >> >> > to figure out how to only open part of an image. I have an image >> >> > with >> >> > about 4 >> >> > or 5 tiles. Each tile is 32x32px. I want to load this 'tile set' >> >> > into >> >> > an >> >> > array so that I can use it in my program. This way I don't have to >> >> > keep >> >> > each >> >> > tile in a differnet bitmap. It's the same idea that winamp uses for >> >> > it's >> >> > skins. If anyone has any suggestions, please help. I just need to be >> >> > pointed >> >> > in the right direction. thanks >> >> > >> >> > :// Jake >> >> >> >> >> >> >> >> >>
- Next message: emars_at_forwild.umass.edu: "Very Large Bitmaps"
- Previous message: Jake: "Re: Tiled Images"
- In reply to: Jake: "Re: Tiled Images"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|