- need to fix.png (117.17 KiB) Viewed 5077 times
Is there a way to "cut" an image?
-
- Fleet Admiral
- Posts: 2876
- Joined: Thu Feb 03, 2011 5:21 am
- Location: Hmm... I'm confused. Anybody have a starmap to the Core?
As you can see here I have a ship image but because the sprites are together other ships are showing as well. Is it possible to cut the extra ships them out?
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
Get on Discord for mod help and general chat
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
- pixelfck
- Militia Captain
- Posts: 571
- Joined: Tue Aug 11, 2009 8:47 pm
- Location: Travelling around in Europe
Interesting question. I tried using a canvas-element in an items image:
but it doesn't work. It would be very useful functionality though.
~Pixelfck
Code: Select all
<Image>
<Canvas>
(cnvDrawImage 0 0 (list &rsItems1; 192 96 96 96))
</Canvas>
</Image>
~Pixelfck
Use a graphics editor such as Paint Shop Pro, Photoshop...etc. and scan the demensions of the image that you want (be sure to scan the complete image and a slight border around it), then scale those demensions into your XML file pertaining to the unit you're using. Unless that's changed in recent versions, that's how I've always set individual images from sprite sheets in game.
In this case he can just lift the dimensions from the image tags in the ship definitions.FAD wrote:Use a graphics editor such as Paint Shop Pro, Photoshop...etc. and scan the demensions of the image that you want (be sure to scan the complete image and a slight border around it), then scale those demensions into your XML file pertaining to the unit you're using. Unless that's changed in recent versions, that's how I've always set individual images from sprite sheets in game.
Literally is the new Figuratively
Yup, that's true as well. Although giving that posted image a second look, each ship class displayed appears to be 4x greater than it should be, so it looks like a scaling problem where it should be scaled down 1/4th its size, so each ship will fit properly....and individually.Atarlost wrote:In this case he can just lift the dimensions from the image tags in the ship definitions.FAD wrote:Use a graphics editor such as Paint Shop Pro, Photoshop...etc. and scan the demensions of the image that you want (be sure to scan the complete image and a slight border around it), then scale those demensions into your XML file pertaining to the unit you're using. Unless that's changed in recent versions, that's how I've always set individual images from sprite sheets in game.
- pixelfck
- Militia Captain
- Posts: 571
- Joined: Tue Aug 11, 2009 8:47 pm
- Location: Travelling around in Europe
I'm pretty sure RPC knows how to scale, resize, cut and recreate new images at the desired dimensions My guess is that he would like to (re)use the standard ship sprite images (which have both varying dimensions and are surrounded by other frames in the sprite) as an item image in the itempicker dockscreens, without introducing any extra resources.
So, in effect, he would like a method to 'cut' a frame from a sprite and display it at the centre of a 96x96 pixels area using either scripting or xml.
Cheers,
Pixelfck
So, in effect, he would like a method to 'cut' a frame from a sprite and display it at the centre of a 96x96 pixels area using either scripting or xml.
Cheers,
Pixelfck
Same here. Also, I would like to scale such images as well. For example, scaling a capital ship to fit within 96x96, or scaling items to 24x24.pixelfck wrote:My guess is that he would like to (re)use the standard ship sprite images (which have both varying dimensions and are surrounded by other frames in the sprite) as an item image in the itempicker dockscreens, without introducing any extra resources.
Download and Play in 1.9 beta 1...
Drake Technologies (Alpha): More hardware for combat in parts 1 and 2!
Star Castle Arcade: Play a classic arcade game adventure, with or without more features (like powerups)!
Playership Drones: Buy or restore exotic ships to command!
Other playable mods from 1.8 and 1.7, waiting to be updated...
Godmode v3 (WIP): Dev/cheat tool compatible with D&O parts 1 or 2.
Drake Technologies (Alpha): More hardware for combat in parts 1 and 2!
Star Castle Arcade: Play a classic arcade game adventure, with or without more features (like powerups)!
Playership Drones: Buy or restore exotic ships to command!
Other playable mods from 1.8 and 1.7, waiting to be updated...
Godmode v3 (WIP): Dev/cheat tool compatible with D&O parts 1 or 2.
Right, considering that he's using a dockscreen that's utilizing the itempicker, those ship images are being treated as items (or the demensions commonly used for items.) That is why there's 4 images being displayed in each 'item' within that dockscreen. The displayed ship images are from the actual ship rotation sprite sheet, not from the items sprite sheet. So what I think is needed here is a way to scale the images within the dockscreen code based on each ship image demensions. Either that or having to resort to creating a complete new sprite sheet having all the ship images scaled to the demensions of items. Or, unless there's already a code somewhere (that I'm not aware of) maybe George could fix/code it to where we could use ship images (or any image) in dockscreens that use the itempicker.pixelfck wrote:I'm pretty sure RPC knows how to scale, resize, cut and recreate new images at the desired dimensions My guess is that he would like to (re)use the standard ship sprite images (which have both varying dimensions and are surrounded by other frames in the sprite) as an item image in the itempicker dockscreens, without introducing any extra resources.
So, in effect, he would like a method to 'cut' a frame from a sprite and display it at the centre of a 96x96 pixels area using either scripting or xml.
Cheers,
Pixelfck