Started generating SVG images for HTML5 client instead of PNG.
This commit is contained in:
parent
aafbbd2948
commit
16314d5edd
2
bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/PresentationController.groovy
Normal file → Executable file
2
bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/PresentationController.groovy
Normal file → Executable file
@ -157,7 +157,7 @@ class PresentationController {
|
|||||||
if (pres.exists()) {
|
if (pres.exists()) {
|
||||||
def bytes = pres.readBytes()
|
def bytes = pres.readBytes()
|
||||||
response.addHeader("Cache-Control", "no-cache")
|
response.addHeader("Cache-Control", "no-cache")
|
||||||
response.contentType = 'image/png'
|
response.contentType = 'image/svg'
|
||||||
response.outputStream << bytes;
|
response.outputStream << bytes;
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
@ -65,8 +65,8 @@ public class PngImageCreatorImp implements PngImageCreator {
|
|||||||
}else{
|
}else{
|
||||||
for(int i=1; i<=pres.getNumberOfPages(); i++){
|
for(int i=1; i<=pres.getNumberOfPages(); i++){
|
||||||
File tmp = new File(imagePresentationDir.getAbsolutePath() + File.separatorChar + "tmp" + File.separatorChar + "slide" + i + ".pdf");
|
File tmp = new File(imagePresentationDir.getAbsolutePath() + File.separatorChar + "tmp" + File.separatorChar + "slide" + i + ".pdf");
|
||||||
File destpng = new File(imagePresentationDir.getAbsolutePath() + File.separatorChar + "slide" + i + ".png");
|
File destpng = new File(imagePresentationDir.getAbsolutePath() + File.separatorChar + "slide" + i + ".svg");
|
||||||
COMMAND = IMAGEMAGICK_DIR + "/convert -density 300x300 -quality 90 +dither -depth 8 -colors 256 " + File.separatorChar + tmp.getAbsolutePath() + " " + destpng.getAbsolutePath();
|
COMMAND = "pdftocairo -svg -q -f 1 -l 1 " + File.separatorChar + tmp.getAbsolutePath() + " " + destpng.getAbsolutePath();
|
||||||
|
|
||||||
done = new ExternalProcessExecutor().exec(COMMAND, 60000);
|
done = new ExternalProcessExecutor().exec(COMMAND, 60000);
|
||||||
if(!done){
|
if(!done){
|
||||||
|
Loading…
Reference in New Issue
Block a user