Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
ANTONIO MAROTO
FileEntry to Image
December 7, 2012 1:09 PM
Answer

ANTONIO MAROTO

Rank: New Member

Posts: 5

Join Date: November 29, 2012

Recent Posts

I'm using the version 6.1 and I need to converto a FileEntry to Image in Java for get width and height of image.

Any idea about that?

Many thanks in advance,
ANTONIO MAROTO
RE: FileEntry to Image
December 9, 2012 3:14 AM
Answer

ANTONIO MAROTO

Rank: New Member

Posts: 5

Join Date: November 29, 2012

Recent Posts

I found the solution:

May be useful to somebody

FileEntry fe= DLAppLocalServiceUtil.getFileEntry(imageId);
Image image = ImageLocalServiceUtil.getImage((DLFileEntryLocalServiceUtil.getFile(fe.getUserId(), fe.getFileEntryId(), fe.getVersion(), true)));