forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

scale images

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development
View previous topic :: View next topic  
Author Message
LuMo



Joined: 21 Aug 2005
Posts: 410
Location: Austria

PostPosted: Tue Apr 11, 2006 5:54 pm    Post subject: scale images Reply with quote

anyone got an idea about scaling an image over time?
(i do not mean x2,x3,x4... the pixels.)
more like photoshop.
thanks a lot
lumo
_________________
"Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com
Back to top
View user's profile Send private message Visit poster's website
KawaGeo



Joined: 27 Aug 2005
Posts: 191
Location: Calif Mountains

PostPosted: Wed Apr 12, 2006 1:18 am    Post subject: Reply with quote

We have a function for OpenGL. It is called glScale(size). It works in both 2D and 3D scenes. Size can be any number like 1.23 or 0.73.

If we have implementation for Lua Player, it would be gl.Scale(size). Too bad, we don't have the implementation yet.

Anyone dare to implement?

PS: I am switching old GLUT with a newer version called GLFW for my implementation in Windows environment.

PSS: I had compared FPS rates between codes in C/C++ and Lua. They are about the same!! Thanks to the power of GPU. Hence, Lua is no problem for being so slow.
_________________
Geo Massar
Retired Engineer
Back to top
View user's profile Send private message Send e-mail
LuMo



Joined: 21 Aug 2005
Posts: 410
Location: Austria

PostPosted: Wed Apr 12, 2006 1:22 am    Post subject: Reply with quote

yeah could create a plane in GU apply texture and scale it...
thought there could be an easier way ;)

greets
_________________
"Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com
Back to top
View user's profile Send private message Visit poster's website
matriculated



Joined: 04 Mar 2006
Posts: 31

PostPosted: Wed Apr 12, 2006 6:31 am    Post subject: Reply with quote

LuMo wrote:

thought there could be an easier way ;)
greets


I hope that's a sign of things to come!
Back to top
View user's profile Send private message
LuMo



Joined: 21 Aug 2005
Posts: 410
Location: Austria

PostPosted: Wed Apr 12, 2006 7:58 am    Post subject: Reply with quote

matriculated wrote:
LuMo wrote:

thought there could be an easier way ;)
greets


I hope that's a sign of things to come!

what do you expect?
_________________
"Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com
Back to top
View user's profile Send private message Visit poster's website
my psprecious



Joined: 17 Feb 2006
Posts: 24

PostPosted: Wed Apr 12, 2006 10:18 am    Post subject: Reply with quote

Hey LuMo

you think something can be done with this

function Image:magnify(mag)
mag = mag or 2 -- 2 times in size by default
local w = self:width()
local h = self:height()
local result = Image.createEmpty(mag*w, mag*h)
for x = 0, w-1 do
for y = 0, h-1 do
result:fillRect(mag*x, mag*y, mag,mag, self:pixel(x,y))
end
end
return result
end

My be a start for what I want, if only I understood exactly what it do, man my maths are far.....
Back to top
View user's profile Send private message
romero126



Joined: 24 Dec 2005
Posts: 200

PostPosted: Wed Apr 12, 2006 10:29 am    Post subject: Reply with quote

nope cant be done with that :-)
Back to top
View user's profile Send private message
LuMo



Joined: 21 Aug 2005
Posts: 410
Location: Austria

PostPosted: Wed Apr 12, 2006 6:35 pm    Post subject: Reply with quote

scaling&rotate is not trivial :o(
[except 90/180/etc rotation and x2,x3,etc scaling.]
_________________
"Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com
Back to top
View user's profile Send private message Visit poster's website
KawaGeo



Joined: 27 Aug 2005
Posts: 191
Location: Calif Mountains

PostPosted: Thu Apr 13, 2006 12:13 am    Post subject: Reply with quote

Yeah, but PSPgl or PSPgu is much faster, even with fractional arguments.
_________________
Geo Massar
Retired Engineer
Back to top
View user's profile Send private message Send e-mail
LuMo



Joined: 21 Aug 2005
Posts: 410
Location: Austria

PostPosted: Thu Apr 13, 2006 12:16 am    Post subject: Reply with quote

i know :D as its using the hardware
_________________
"Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group