• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Multimedia Fun with OpenOffice Calc
 

Multimedia Fun with OpenOffice Calc

on

  • 942 views

Multimedia Fun with OpenOffice Calc

Multimedia Fun with OpenOffice Calc
發表於OSDC.tw 2013 2013/4/19 15:30中研院國際會議室

Get Calc Mosaic at http://sf.net/p/calcmosaic

Statistics

Views

Total Views
942
Views on SlideShare
932
Embed Views
10

Actions

Likes
2
Downloads
3
Comments
0

2 Embeds 10

http://www.plurk.com 5
https://twitter.com 5

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

CC Attribution-ShareAlike LicenseCC Attribution-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Multimedia Fun with OpenOffice Calc Multimedia Fun with OpenOffice Calc Presentation Transcript

    • Multimedia Fun with OpenOffice Calc imacatimacat@mail.imacat.div.tw 2013-04-19
    • “Multimedia Fun with OpenOffice Calc” is created by imacat (Yang Shih-Ching),and licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License
    • Create charts and reports
    • imacat● Member of the Apache OpenOffice Project Management Committee● An OpenOffice committer● System administrator of OpenOffice forum and Wiki● A member of Women in Free and Open Source Software● A graduate student from National Taiwan Normal University
    • Question:What do you do with a spreadsheet?
    • Counting salaries
    • Counting student scores
    • Creating charts and reports
    • Creating quotations
    • Doing calculation for strategy games
    • Voting machine
    • This talk is a modification of my previous talkin ApacheCon Europe 2012 at Sinsheim, German on 2012/11/6…
    • …with additions ofsome of my interesting works afterwards.
    • And my talk in Germanwas based on my lightning talk in COSCUP 2013
    • Has anyone attended to my lightning talk in COSCUP 2013?Has anyone remember what I had done?
    • My lightning talk in COSCUP 2013 was about something I didjust one week before COSCUP 2013, which I had not enough time to finish and present it completely.
    • And here is the story.
    • Long time ago in the far, far land when I was still a child…
    • Long time ago in the far, far land when I was still a child…Well, actually it was only in last August. :p
    • I saw on my RSS reader...
    • So I followed the story and watched the video…
    • It’s cool, isn’t it?
    • It’s cool, isn’t it?Yes, it’s SO COOL!
    • I forwarded it onto our Google Plus, our Facebook fans page, our forums, local forum, etc.
    • I forwarded it onto our Google Plus, our Facebook fans page, our forums, local forum, etc. Then I put it away and return to my textbook.
    • Until I saw Rob talking about this video the next day…
    • So I watched it again, and also the “behind the scenes”…
    • Well, I think…
    • Well, I think…Yeah, I can do it…
    • Well, I think…Yeah, I can do it…programmatically!
    • Creating mosaic arts involvescalculating the average colors of image blocks.Since neither OpenOffice BASIC nor UNO API has any method to obtain the colors of individual pixels, I have use Java to do this.
    • So here it is… ^_^
    • (demonstration)
    • It’s cool, isn’t it?
    • No.
    • No, that’s not cool.It’s uglier than the original “Stop-Motion Excel”. It’s not the “eye candy” that I imagined.
    • Why? The original “Stop-Motion Excel” was painted manually, cell by cell.MysteryGuitarMan painted it with a fixed palette, but not “average colors”.It looks sharp. It feels like an animation.
    • Comparing Hand-Painted Colors with Mosaic Average Colors
    • So I need to find something more cool, something sharp, something with a high contrast.
    • That is not an easy task.
    • The idea of Calc Mosaic is not only to create mosaic arts,but also to create stop-motion animations.
    • But it takes averagely 20 secondsto create a spreadsheet of mosaic art with the Java UNO application. I cannot run the animationby creating the mosaic art at real-time.
    • So I turn to another method,to create each frame with a spreadsheet, and play them in sequence, as a stop-motion animation.
    • But then a spreadsheet document can only contain a maximum of 256 spreadsheets.
    • Since I only have 256 frames, this cannot be long.
    • I remembered there is the iPod Ad
    • The iPod Ad…● Has only 31 seconds, corresponding to 8 FPS if we are having 256 frames.
    • The iPod Ad…● Has only 31 seconds, corresponding to 8 FPS if we are having 256 frames.● Has sharp images, high contrasts.
    • The iPod Ad…● Has only 31 seconds, corresponding to 8 FPS if we are having 256 frames.● Has sharp images, high contrasts.● Is very famous.
    • So here it is…
    • (demonstration)
    • At the same time, Villeroy responded to myCalc Mosaic on the forum, using a different approach.
    • Villeroy’s Response
    • So here it is…
    • (demonstration)
    • As you can see, Villeroy places the color values in the cells. The OpenOffice BASIC macro can read andupdate the cell background colors accordingly. OpenOffice BASIC is a lot faster than Java UNO.This makes it possible to animate at real time.
    • Villeroy’s approach still has some disadvantages…
    • Disadvantages of Villeroy’s Approach● You still need to have the color values first.
    • Disadvantages of Villeroy’s Approach● You still need to have the color values first.● The frame rate is still low.
    • Disadvantages of Villeroy’s Approach● You still need to have the color values first.● The frame rate is still low.● Villeroy updates the colors with styles. – A lot faster than painting the background color cell by cell. – The number of colors to use is limited. That is why it is gray-scaled.
    • This is a different approach than me. But I still got greatly inspired.
    • The color values can be saved in the sheets, and painted with OpenOffice BASIC. This can make it a lot faster.
    • And I know there is the setDataArray() in the interface XCellRangeData.I can populate all the color values at once instead of hundreds of UNO calls to set the CellBackColor property Of SheetCell.
    • The New Process Will Be…1.Calculates the average colors of mosaic cells with the Java application.
    • The New Process Will Be…1.Calculates the average colors of mosaic cells with the Java application.2.Passes the color values from Java to OpenOffice BASIC.
    • The New Process Will Be…1.Calculates the average colors of mosaic cells with the Java application.2.Passes the color values from Java to OpenOffice BASIC.3.Paints the background colors of the spreadsheet cells with the OpenOffice BASIC macro.
    • So the problem becomes: Writing an applicationboth in Java and OpenOffice BASIC.
    • So the problem becomes: Writing an application both in Java and OpenOffice BASIC. Or, simply,Creating the OpenOffice BASIC macros through the UNO API with Java.
    • In the unpublished UNO API, there is a BasicLibraries property in OfficeDocument that application developers canaccess, insert or delete the BASIC macros.
    • There’s also the XScriptProvider interface that I can use it to invoke the existing OpenOffice macros.
    • So I use them to “inject” the BASIC macrosinto the newly-created spreadsheet document, and run these macros.
    • In fact, I don’t even need to use setDataArray()to paste the color values into the spreadsheets. I can pass the color values as parameters to the invoked BASIC macros.
    • This is troublesome, but the result is amazing.It is 8 times faster then before!
    • When I prepare for my ApacheCon presentation,I became more and more greedy.
    • I want something new, something hot,something gets people excited!
    • Then I came across this…
    • Something hot…
    • Well, again, I think…
    • Well, again, I think… Yeah, I can do it!
    • So here is it.
    • When preparing for OSDC.tw,Gangnam Style became outdated. I need a new one.
    • (demonstration)
    • That is the story of Calc Mosaic.To create your own Mosaic video, get Calc Mosaic at http://sf.net/p/calcmosaic.
    • More Than Calc Mosaic
    • Last year after I returned from German, I attended to a speech in our institute at the end of November. It was about new media art.
    • New Media Art
    • Oh, no…
    • Oh, no…I can do it.
    • I can do it…● I can play piano notes using the Shell command “mplayer” in OpenOffice BASIC.
    • I can do it…● I can play piano notes using the Shell command “mplayer” in OpenOffice BASIC.● I can attach click events with picture objects.
    • I can do it…● I can play piano notes using the Shell command “mplayer” in OpenOffice BASIC.● I can attach click events with picture objects.● I can change the colors of the Calc spreadsheet cells.
    • I can do it…● I can play piano notes using the Shell command “mplayer” in OpenOffice BASIC.● I can attach click events with picture objects.● I can change the colors of the Calc spreadsheet cells.● Its possible to create an animated, interactive Piano with Calc.
    • (demonstration)
    • Furthermore,with a little modification,I released a piano quest in the Christmas.
    • (demonstration)
    • Thank you.Any question?