You can re-use below code to get image from image gallery and can use in any of your portlet.
private IGImage getImage(IGFolder igFolder, String imageName, ThemeDisplay themeDisplay) { IGImage igImage = null; if (igFolder != null) { try { ListimgList = IGImageLocalServiceUtil.getImages(themeDisplay.getScopeGroupId(), igFolder.getFolderId()); for (IGImage igImg : imgList) { if (imageName.equalsIgnoreCase(igImg.getName())) { igImage = igImg; break; } } } catch (Exception e) { System.out.println(e.getMessage()); } } return igImage; }