header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
panindra
Points:0
Posts:0

8/9/2010 4:34:33 AM

Title: How to crop image in flex


im newbie to flex4...
i have an image of 800*600 dimension but i v to crop it into 100*100...
how can i do tat??
please can anyone help me?



1
Justin
Points: 600
Posts:0
8/9/2010 4:42:38 AM



load the image in flex then capture the area required to be cropped using the bitmap class and then you can send the bitmap data to server side to save as image . you can save the bitmap as jpg, png etc using the flex inbuild classes.

2
Dave
Points: 970
Posts:1
8/9/2010 4:44:00 AM



see my answer in this thread , It shows how to capture the bitmap and send to server to save. In flex web application you cannot save directly, in AIR apoplication you can.

http://askmeflash.com/qdetail/528/save-image-using-filereference

3
panindra
Points: 0
Posts:0
8/10/2010 3:11:41 AM



hi im newbie to flex..
im using itemrenderer in a list to use a Hbox..
n Hbox contains a image,label and button,...i v to change a particular row of a list...
To be more precise,i v to change the image of particular row of a list dynamically.
how ca i change dynamically the source of that image?
please anyone help me..

4
Rex
Points: 1280
Posts:0
8/10/2010 8:54:55 AM



update the dataprovider of list the images in the list will automatically update

5
panindra
Points: 0
Posts:0
8/10/2010 9:05:31 PM



but i v to change only particular image,,not all the images..so how can i do tat?

6
Rex
Points: 1280
Posts:0
8/10/2010 9:19:37 PM



yeah I am telling you that only, you need to update the particular item in your dataprovider whether its array or array collection. Say you want to update the 3rd image then update the path of 3rd item in collection and may also call refresh function if i does not automatically refresh.

myList.refresh()

You cannot directly change list , changing dataprovider will automatically re-render and update it

7
panindra
Points: 0
Posts:0
8/11/2010 1:03:42 AM



thanks a lot...i understood what i'm supposed to do but still i'm struck with updating particular item of an item renderer can u give some example please?

8
Troy
Points: 820
Posts:0
8/11/2010 10:12:20 AM



you can use MydataProvider.getItemAt(index:int) to get a particular object and update with new image path then set it using
MydataProvider.setItemAt(item:Object, index:int)

you an also use removeItemAt(index) and addItemAt(index) to change data in ArrayCollection

9
panindra
Points: 0
Posts:0
8/18/2010 5:33:34 AM



Hi im new to flex..
i need to save an image in a specific location using filereference class but i dont want to show the dialog box when i use save method.. how can i do it? please can anyone help me..??

10
Dave
Points: 970
Posts:1
8/18/2010 7:40:03 AM



@panindra you cannot do that in flex browser based application due to security reasons. You can do this in Adobe AIR application. check this article for that :
http://askmeflash.com/tutorial/6/save-file-in-adobe-air-without-dialog-window

11
panindra
Points: 0
Posts:0
8/18/2010 10:20:35 PM



Thanks a lot for your guidance..

12
panindra
Points: 0
Posts:0
8/19/2010 1:49:35 AM



hi i could not crop an image...actually i want to crop an image of 600*800 to 100*100 and save it..how can i do it?please can anyone help me?

13
dd
Points: 0
Posts:0
7/23/2011 8:13:17 AM



maybe this could help

http://www.flexer.info/2008/10/16/how-to-crop-and-resize-an-image-used-as-background-for-canvas/


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 6+0 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions