Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

image rotation in abap

Former Member
0 Kudos
774

hi friends,

is there anyway that v can do image roation in abap.

or any other software which can do image roation bt it has to be linked through abap or sap

i am working on a jewellery project and so i have to display the final product and hence need image rotation.

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
263

Are you displaying this image in a screen? Using what?

Regards,

Rich Heilman

12 REPLIES 12

naimesh_patel
Active Contributor
0 Kudos
263

Check this Blog:

/people/thomas.jung/blog/2007/09/05/abap-bitmap-image-processing-class

It has all, what you want.

Regards,

Naimesh Patel

0 Kudos
263

hi,

thanks for ur answer.

1 more question

is there anyway we can see and rotate the image in 3D.

0 Kudos
263

Not much Idea.

Regards,

Naimesh Patel

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
264

Are you displaying this image in a screen? Using what?

Regards,

Rich Heilman

0 Kudos
263

hi,

yeah im using a screen program to display the image

0 Kudos
263

well the ECL viewer provides the "rotation" as well as other functionality automatically. You could use a screen container to implement the ECL viewer, and the class for the ECL viewer is CL_GUI_ECL_2DVIEWER. Once the image is loaded, you can rotate any direction using the menu options within the viewer. You may need to load this part of the SAPgui on your machince to get this to work. It is a part of the SAPgui, so simply run the installation and choose this option for installation. Also, there is a 3D viewer but I believe it only works with 3D documents such as AutoCad drawings and stuff. The class for that is CL_GUI_ECL_3DVIEWER

Regards,

Rich Heilman

0 Kudos
263

thanks a lot,

can i get some more elaboration on this class,

i mean any source code on how to use it i would b really greatful to you

0 Kudos
263

Here is an example application, basically you put the file path of the image and hit enter, it will show on the space on the right. Depending on your settings and version of the ECL viewer installed in your sapgui, the rotate functionality may or may not be visible. check the menu options.

REPORT rich_0001.

PARAMETERS: url(2048) TYPE c default 'c:\test.bmp'.

START-OF-SELECTION.

AT SELECTION-SCREEN OUTPUT.

DATA:

dockingright TYPE REF TO cl_gui_docking_container,

ecl_viewer TYPE REF TO cl_gui_ecl_2dviewer.

DATA: repid TYPE syrepid.

repid = sy-repid.

CHECK dockingright IS INITIAL.

CREATE OBJECT dockingright

EXPORTING

repid = repid

dynnr = sy-dynnr

side = dockingright->dock_at_right

ratio = 50

extension = 1000.

CREATE OBJECT ecl_viewer

EXPORTING

parent = dockingright

EXCEPTIONS

cntl_error = 1

cntl_system_error = 2

create_error = 3

lifetime_error = 4

OTHERS = 5.

CALL METHOD ecl_viewer->create_toolbar

EXPORTING

close_button = ' '

tools = 'X'

viewer = 'X'

navigation = 'X'

OPTIONS = 'X'

viewer_openfile = 'X'

viewer_savefile = 'X'

tool_measurement = 'X'

remove_document = ' '

EXCEPTIONS

cntl_system_error = 1

cntl_error = 2

cntb_btype_error = 3

dp_error = 4.

IF url IS NOT INITIAL.

CALL METHOD ecl_viewer->open_document( file = url ).

ENDIF.

Regards,

Rich Heilman

0 Kudos
263

hi,

i am not able to create the object ecl_viewer

i am able to create the container object,im gettin sy-subrc as '1' with create ecl_viewer statement

where am i goin wrong and where would i get a ecl viewer,its not freely available right ??

0 Kudos
263

thanks a lot, my problem is solved.

sir jst 1 more query,now can i display n number of images on screen,and can we add a scroll functionality for the images.

0 Kudos
263

I don't think you can do that with the ECL viewer, but if the image file had multiple pages, like a fax image, you can scroll thru the pages. But it must all contain within the single file.

Regards,

Rich Heilman

0 Kudos
263

hello sir,

am using ECL viewer software and the class CL_GUI_ECL_2DVIEWER to display a image.

now when the first time when the user selects an image it is displayed properly in the container,but when the user chooses the another image it is not displayed,the first image still remains there.

how to solve this problem