From cf1c6390beca798af7696e23a808dfb7dc603a7d Mon Sep 17 00:00:00 2001 From: Maxim Khlobystov Date: Mon, 6 Jul 2015 14:26:13 -0400 Subject: [PATCH] Made SVG images accessible by HTML5 client. --- .../main/scala/org/bigbluebutton/core/BigBlueButtonInGW.scala | 2 +- .../org/bigbluebutton/web/services/PresentationService.groovy | 4 ++-- .../presentation/imp/PdfPageToImageConversionService.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) mode change 100644 => 100755 bigbluebutton-web/grails-app/services/org/bigbluebutton/web/services/PresentationService.groovy diff --git a/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/BigBlueButtonInGW.scala b/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/BigBlueButtonInGW.scala index 0a369c53de..606b9e55c6 100755 --- a/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/BigBlueButtonInGW.scala +++ b/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/BigBlueButtonInGW.scala @@ -241,7 +241,7 @@ class BigBlueButtonInGW(bbbGW: BigBlueButtonGateway, presUtil: PreuploadedPresen val swfUri = presBaseUrl + "/slide/" + i val txtUri = presBaseUrl + "/textfiles/" + i - val pngUri = presBaseUrl + "/png/" + i + val pngUri = presBaseUrl + "/svg/" + i val p = new Page(id=id, num=num, thumbUri=thumbnail, swfUri=swfUri, txtUri=txtUri, pngUri=pngUri, diff --git a/bigbluebutton-web/grails-app/services/org/bigbluebutton/web/services/PresentationService.groovy b/bigbluebutton-web/grails-app/services/org/bigbluebutton/web/services/PresentationService.groovy old mode 100644 new mode 100755 index 2b1f6b0cc2..f1b52a1552 --- a/bigbluebutton-web/grails-app/services/org/bigbluebutton/web/services/PresentationService.groovy +++ b/bigbluebutton-web/grails-app/services/org/bigbluebutton/web/services/PresentationService.groovy @@ -95,7 +95,7 @@ class PresentationService { } def showPngImage(String conf, String room, String presentationName, String id) { - new File(roomDirectory(conf, room).absolutePath + File.separatorChar + presentationName + File.separatorChar + "pngs" + File.separatorChar + "slide${id}.png") + new File(roomDirectory(conf, room).absolutePath + File.separatorChar + presentationName + File.separatorChar + "pngs" + File.separatorChar + "slide${id}.svg") } def showPresentation = {conf, room, filename -> @@ -168,6 +168,6 @@ import java.io.FilenameFilter; import java.io.File; class PngFilter implements FilenameFilter { public boolean accept(File dir, String name) { - return (name.endsWith(".png")); + return (name.endsWith(".svg")); } } diff --git a/bigbluebutton-web/src/java/org/bigbluebutton/presentation/imp/PdfPageToImageConversionService.java b/bigbluebutton-web/src/java/org/bigbluebutton/presentation/imp/PdfPageToImageConversionService.java index bcf233a91f..ed47637f55 100755 --- a/bigbluebutton-web/src/java/org/bigbluebutton/presentation/imp/PdfPageToImageConversionService.java +++ b/bigbluebutton-web/src/java/org/bigbluebutton/presentation/imp/PdfPageToImageConversionService.java @@ -41,7 +41,7 @@ public class PdfPageToImageConversionService { log.debug("Creating temporary pdf " + tempPdfFile.getAbsolutePath()); if (extractor.extractPage(presentationFile, tempPdfFile, page)) { - File tempPngFile = new File(tempDir.getAbsolutePath() + "/temp-" + page + ".png"); + File tempPngFile = new File(tempDir.getAbsolutePath() + "/temp-" + page + ".svg"); log.debug("Creating PNG " + tempPngFile.getAbsolutePath()); if (pdfToImageConverter.convert(tempPdfFile, tempPngFile, 1)) {