Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
97 user(s) are online (90 user(s) are browsing Forums)

Members: 0
Guests: 97

more...

Support us!

Headlines

 
  Register To Post  

image scaling[solved]
Home away from home
Home away from home


See User information
Is there an "easy" way to scale an jpg image??


Edited by Antique on 2012/11/10 11:13:36
X5000
Go to top
Re: image scaling
Home away from home
Home away from home


See User information
Yes

Go to top
Re: image scaling
Home away from home
Home away from home


See User information
@broadblues

Nice, any more hints/examples or something usefull for me?

X5000
Go to top
Re: image scaling
Home away from home
Home away from home


See User information
Well your question was a bit vague.

If you just want to scale a random image to sen by email or something , then I would, (assuming you have SketchBlock installed, with ProAction and PIL)

start SketchBlock

Choose import from the project menu and select your jpg file.

The choose Scale Image from the "Image" menu and anter the new size in the window that pops up.

The choose Export AS from the Project menu and choose JPG from the list of files, and choose your outpur file.

Or use ImageFX

Or what did you really want to do?

[edit]
So poking arround in the forum index I can see that this is the developement forum so you likely want to do this as a program. How do you tell the forums apart, when if you look at the forum title they just sau "AmigaOS4" ?

If it really is a dev question, then a bit more context would be useful.... what do you want to do with this image once scaled? What sort of prgram are you aiming for?

[/edit]


Go to top
Re: image scaling
Amigans Defender
Amigans Defender


See User information
Programmatically, the easiest way would be to load the JPEG using datatypes, and call PDTM_SCALE on it.

But it really depends exactly what you are trying to achieve.

Go to top
Re: image scaling
Home away from home
Home away from home


See User information
Ok, i'll try to be a bit more precise.

I have image. All images are the same size. But i want to be able to either click on the image or hold the mouse over it. And then scale it say twice the size. I'm thinking of scaling it and to put it on a new window.Working with c offcourse.

X5000
Go to top
Re: image scaling
Home away from home
Home away from home


See User information
Reaction GUI?

Load it into a bitmap.image and scale it, that handles all the datatypes stuff for you.

Have alook at my SnakeEyes program, it;s in python but it fdoes all the display via ReAction GUI (using ProAction but ProAction uses all the same tags etc as C)



Otherwise a little bit more detail required



Go to top
Re: image scaling
Home away from home
Home away from home


See User information
I'm using reaction yes.

Been thinking a bit more.
I need to duplicate the image,since i need the original as it is. And then i need to resize the copy. Is composite a good thing to use? Ain't that using hw acceleration? Is there any good docs and maybe examples to using that? Speed is a nice thing i believe. Fastest way to duplicate the image aswell.

X5000
Go to top
Re: image scaling
Home away from home
Home away from home


See User information
@Antique
Finnaly got my head together and found the solution. Thansk to broadblues fot the help.

X5000
Go to top
Re: image scaling
Just can't stay away
Just can't stay away


See User information
@broadblues

How did you get that IA_Left and IA_Top stuff working with BitMap class object ? RethinkLayout() has no effect. DoMethod(WinObj,WM_RETHINK) does strange effects when used after NEWSIZE message. What is RETHINKGUIWINDOW command you're using ?

Rock lobster bit me - so I'm here forever
X1000 + AmigaOS 4.1 FE
"Anyone can build a fast CPU. The trick is to build a fast system." - Seymour Cray
Go to top
Re: image scaling
Home away from home
Home away from home


See User information
@TSK

Quote:

How did you get that IA_Left and IA_Top stuff working with BitMap class object ? RethinkLayout() has no effect. DoMethod(WinObj,WM_RETHINK) does strange effects when used after NEWSIZE message. What is RETHINKGUIWINDOW command you're using ?



I set "LAYOUT_NoLayout,1," in the parent layout of the image.

That means I have to layout the image manually, so I can set the aspect ratio etc the way I like.

Check the function ReLayoutImage() for how I did that.


RETHINKGUIWINDOW is a Wrapper for

IIntuition->IDoMethod(gui->gui_WinObj,WM_RETHINK,NULL);



Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project