(suggestion) please add a way to crop a image

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
Shadowblitz16
Citizen
Posts: 73
Joined: Wed Oct 28, 2015 11:18 pm

(suggestion) please add a way to crop a image

Post by Shadowblitz16 »

please add a way to crop images and textures!
something as simple as image.crop(x,y,w,h) would be fine as long as it returned a image or imagedata

this could be used to make 1d tilebanks like what the older consoles used without having to code a ton of exceptions for tilesheets like.. exporting,
importing,
format,
multiple pages.
User avatar
ivan
Party member
Posts: 1911
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: (suggestion) please add a way to crop a image

Post by ivan »

Are you aware that you can already draw cropped images using quads?
User avatar
unek
Citizen
Posts: 86
Joined: Fri Oct 12, 2012 8:43 pm
Location: Poland
Contact:

Re: (suggestion) please add a way to crop a image

Post by unek »

ImageData:paste does that
DRAW DRAW - online painting app CLICK NUMBERS - cool game with numbers THEME LOVEFRAMES - a collection of my themes HOST FOR FREE - free hosting for online LOVE games STALK PEOPLE - a map of LOVE users
User avatar
pgimeno
Party member
Posts: 3548
Joined: Sun Oct 18, 2015 2:58 pm

Re: (suggestion) please add a way to crop a image

Post by pgimeno »

unek wrote: Wed Apr 25, 2018 10:17 am ImageData:paste does that
I knew I was missing something.
User avatar
Guard13007
Party member
Posts: 132
Joined: Sat Oct 25, 2014 3:42 am
Location: Internet, USA
Contact:

Re: (suggestion) please add a way to crop a image

Post by Guard13007 »

While it would be convenient, there are other options that should be learned if it needs to be dynamic in some way, and otherwise this is the kind of thing that should be done in a editor rather than in a game engine, no?

(Note: I am speaking out of my ass at least a little, as I do not understand Quads at all. I understand a little of the ImageData stuff, but not that.. >.>)
User avatar
zorg
Party member
Posts: 3441
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: (suggestion) please add a way to crop a image

Post by zorg »

Guard13007 wrote: Thu May 03, 2018 8:59 am While it would be convenient, there are other options that should be learned if it needs to be dynamic in some way, and otherwise this is the kind of thing that should be done in a editor rather than in a game engine, no?

(Note: I am speaking out of my ass at least a little, as I do not understand Quads at all. I understand a little of the ImageData stuff, but not that.. >.>)
I would say that Quads are dynamic enough, but ultimately if you want even more freedom, you can use a Mesh directly; that also allows you to have arbitrary shapes and vertex parameters, unlike Quads, that restrict you to quadrilaterals (each two sides parallel)
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 28 guests