How to Modify the OpenZoom Nano Viewer?
Hi,
First, I'm new to flash. I'd like to try to see if I can modify a bit the OpenZoom viewer there :
http://gasi.ch/blog/pimp-your-photosh...
(btw, I get an error message when I try to see the source).
So I downloaded a few flash decompilers (Gold, Trilix), but they all crashed when I fed them with this file. How can I modify it ?
In the discussion under the post above, you give this link :
http://code.google.com/p/open-zoom/so...
It seems that the parameters I need to modify are there... but how do I turn this into a swf file ?
In particular, I would like to limit the maximal zoom to 100% instead of 400%, and maybe add a little map...
BTW, I'm using your great applet there :
http://www.algorithmic-worlds.net
Thanks and best wishes,
Sam
First, I'm new to flash. I'd like to try to see if I can modify a bit the OpenZoom viewer there :
http://gasi.ch/blog/pimp-your-photosh...
(btw, I get an error message when I try to see the source).
So I downloaded a few flash decompilers (Gold, Trilix), but they all crashed when I fed them with this file. How can I modify it ?
In the discussion under the post above, you give this link :
http://code.google.com/p/open-zoom/so...
It seems that the parameters I need to modify are there... but how do I turn this into a swf file ?
In particular, I would like to limit the maximal zoom to 100% instead of 400%, and maybe add a little map...
BTW, I'm using your great applet there :
http://www.algorithmic-worlds.net
Thanks and best wishes,
Sam
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
The company marked this question as answered.
-
Inappropriate?Samuel,
Funny that you've tried to decompile the viewer, considering it's all open source!
To create your own viewer, you should get the free and open source Flex SDK from Adobe: http://www.adobe.com/products/flex/fl...
If you're comfortable with the command line you should be fine. Otherwise, I suggest you to get the free Adobe Flex Builder trial where you can import the OpenZoomViewer project from the OpenZoom repository directly. Since you're new to Flash/Flex, I can highly recommend you the official documentation as well as the many great forums on the web. However, I'd be happy to answer your questions specific to the OpenZoom SDK right here.
BTW, your site and artwork rocks!
Cheers,
Daniel
P.S. Thanks for pointing out the broken link. I've fixed it.
I’m amused
-
Inappropriate?Yes, it just shows my ignorance. I opened the swf file in a text editor, saw random strings of characters and deduced that it needed to be decompiled somehow.
I'm definitely not ambitious enough to try to create my own viewer, it would take me months to learn all this anyway. I'd just like to change one or two parameters here and there. Do I really need this 118 MB program to do this ? And if so, would it be sufficient to change the parameters I want in your .as file and compile it with the Flex Builder to get a new swf file ? (Sorry for the stupid questions, it's just to have a rough idea of what I'd have to do...)
Happy you enjoy my artwork !
Thanks again and best wishes,
Sam -
Inappropriate?Sam,
Yes, importing and modifying the original OpenZoomViewer ActionScript class should be enough to change the parameters.
Good luck!
Cheers,
Daniel
I’m confident
-
Inappropriate?Well more stupid questions... I just tried to recompile your file http://tinyurl.com/dll6ve
for now. It works well until line 271, where I get this error message : "Type was not found or was not a compile-time constant : MultiScaleImage"
I suppose that it cannot find the path of the file where MultiScaleImage is defined. I downloaded the Flex MultiScaleImage Component, put it in a directory above my root directory, and downloaded the OpenZoomViewer.as file in the same directory as the Flex MultiScaleImage Component.
What's wrong ?
Best,
Sam -
Inappropriate?Sam,
Did you download the SWC? If so, put it into your libs folder that is created automatically by Flex Builder.
Daniel -
Inappropriate?I've just tried to put the file
openzoom-preview-111.swc
(the only swc file present in your package) in the lib folder but it doesn't help...
What I suspect is that the .as file is not at the right place, and that some path specified in it are relative to its location... ?
Sam -
Inappropriate?Hello Samuel,
Hello Daniel,
same problem here:
I am also new to Flash and trying to get your Photoshop-PlugIn up and running on my own, since the compiled version provided at http://gasi.ch/blog/pimp-your-photosh... contains strange characters in the context menu (see also the live demo at http://gasi.ch/examples/2008/12/23/ph...).
I have downloaded the Flex SDK and checked out the whole trunk via SVN today.
When I try to build the viewer I get the following error (ok, it's in german but obviously the same error message):
---cut---
C:\>"C:\Programme\Adobe\Adobe Flex\bin\mxmlc.exe" "$Path\to\SVN\projects\photoshop-plugin\viewer\src\OpenZoomViewer.as"
Loading configuration file C:\Programme\Adobe\Adobe Flex\frameworks\flex-config.xml
$Path\to\SVN\projects\photoshop-plugin\viewer\src\OpenZoomViewer.as(271): col: 52 Error: Typ wurde nicht gefunden oder war keine Kompilierungszeit-Konstante: MultiScaleImage.
private function configureTransformer( image : MultiScaleImage ) : void
^
[...]
C:\>
---cut---
As you might have noticed, I have replaced the real path with "$Path\to\SVN\" in the example above and shortened the excerpt a bit (marked with "[...]"):The same error message is also reported for the occurences of MultiScaleImage in lines 279, 294, 341 and 357.
I should also mention that the tiny circumflex is positioned under the "M" of MultiScaleImage when using a monospace font.
Like Samuel I could not apply your hints to my/our problem.
I hope this information is sufficient - please let me know, if you need more information.
Best regards,
Matthias -
Inappropriate?Yes, exactly the same problem as me... Thanks for the more complete description.
Sam -
Inappropriate?Sam & Matthias,
Thanks for the more detailed explanation. It's obvious that in both cases the OpenZoom SDK is not correctly linked to your project. Having a fresh working copy checked out from the trunk is certainly the best way until there's a public release of the SDK.
Now, you may have noticed that there's an Eclipse linked resource called ${OPENZOOM} in many of my project files. Either point this resource to your own path of the OpenZoom SDK or, alternatively, you link the OpenZoom SDK source in your Flex Builder project under Project > Flex Build Path > Source path.
Please refer to the Flex Builder documentation for more details:
http://livedocs.adobe.com/flex/3/html...
Cheers,
Daniel
P.S. I've updated the repository so that if you have the newest revision it should work in Flex Builder assuming you have the correctly set the Linked Resource ${OPENZOOM}.
-
Hi Daniel,
I downloaded Flex Builder 3 and I am trying to launch the nano OpenZoomViewer. I also received the same errors as Sam & Matthias. I then added the path to the SDK as instructed which eliminated those errors.
Now when I try to launch the viewer I get the following error:
Launch Failed
File not found: file:/C:/Users/mars/Documents/openzoom/nano/trunk/bin-debug/OpenZoomViewer.html -
Mars,
Which version of the OpenZoom SDK are you using? Did you import the project with the existing settings? Well, to solve your problem, I'd suggest you choose Project > Clean... and clean all projects. Then right-click on the Nano project and select Properties. Under ActionScript Compiler deselect Generate HTML wrapper file. Now right click on OpenZoomViewer.as and select Run As > Flex Application. Does that work?
–Daniel -
Hi Daniel,
I followed your instructions and now I get the following error:
File not found: file:/C:/Users/mars/Documents/openzoom/nano/trunk/bin-debug/OpenZoomViewer.swf -
One more thing - the last step - "Now right click on OpenZoomViewer.as and select Run As > Flex Application."
I don't have that option when I right-click on the OpenZoomViewer.as -
Mars,
The errors you're receiving mean your viewer has never even compiled. Your bin-debug folder must be empty. How did you setup the Nano project? I'd suggest you download a fresh copy of the SDK, set the OPENZOOM_HOME linked resource and everything will work.
–Daniel -
Mars,
If you upload a zipped copy of your nano folder, I'll take a look at it.
–Daniel -
Daniel,
How and where do I set the OPENZOOM_HOME linked resource?
-Mars -
It's right here: http://github.com/openzoom/sdk/raw/94...
Googling «eclipse linked resource» gives me this:
http://help.eclipse.org/help33/index....
–Daniel -
Inappropriate?Hi,
Sorry, I still don't understand... The Flex builder documentation doesn't say anything about how to use linked ressources from the command line application.
I understand that an "Eclipse linked ressource" is a file or folder that is not in the directory of your project, but is used by your project. Now what is this ${OPENZOOM} ? For instance there is no such tag in the OpenZoomViewer.as file. There is a file called org.eclipse.core.resources.prefs in the .settings directory of your project, but I've no idea how to use it...
Maybe if you don't feel like explaining all of this (what I would completely understand) you could answer a much more pragmatic question. Where do I put your project directory compared to the directory flex_sdk_3 in which the command line compiler is installed so that your project will compile ?
Really, I just want to change parameters in the OpenZoomViewer.as file and compile it.
And just to suggest a feature, it would be nice to have an OpenZoomViewer.swf applet that would take its parameters from an extra xml file, like it is the case with the Zoomify applet. It would spare this recompiling business.
Many thanks and best wishes,
Sam -
Inappropriate?Sam,
I can understand your frustrations but let me ask you, if you're not comfortable with the command line, why use it? Simply download the Flex Builder trial which makes things considerably easier since you're new to Flash/Flex.
I don't know if you've noticed but I've updated the OpenZoom Adobe Photoshop templates which are now known as OpenZoom Tango. The update resets the default magnification to 100% instead of 400% as before: http://open-zoom.googlecode.com/files...
Are you familiar with Apache Ant? If yes, I could maybe put together a build file that would help you if you really decide to stick to the command line Flex compiler. What do you think?
As for the configuration XML file: I know that would be the most reasonable solution but it conflicts with my philosophy behind the OpenZoom project. I want to empower people to create innovation. Having a configurable, pre-built viewer somewhat stands in the way of innovation. When I look at Zoomify it failed to drive innovation. Everyone reused their viewer and it took many years until Deep Zoom was released and we got where we are with great examples of innovation such as Hard Rock Memorabilia or the Playboy Archives. This is what drives me to work on OpenZoom. Someday, I hope, experiences like these will be much more common than today.
Cheers,
Daniel
I’m dreaming
-
Inappropriate?Hi,
Yes, I understand your philosophy, and from this point of view it's really great that you keep everything open. On the other hand for a user (like me) who just want to tweak a few parameters, learning flash is a bit too large investment...
But thank you very much for the "tango" files, they fit my purpose for now. :) When I have more time I might try to play with your source and the flex builder...
Again thanks for this great tool !
Best wishes,
Sam
-
Inappropriate?Sam,
Thanks for your understanding. If you have any ideas on how we could meet somewhere in the middle and improve the situation for everyone, feel free to post them here. I am open to suggestions.
Cheers,
Daniel
-
Inappropriate?Hi, me again...
Just a question, with the "tango" files, is it possible to have as default view (when the flash applet is launched) a zoomed part of the image, instead of the global view ? If so, where are the parameters to specify the center and the magnification of the default view ?
Thanks and best regards,
Sam
P.S.: I'm using your applet extensively here: http://www.algorithmic-worlds.net . Thanks again! -
Inappropriate?Samuel,
Just curious, are you asking whether it's already there, how to do it yourself or whether I am considering implementing this feature?
Cheers,
Daniel
I’m curious
-
Inappropriate?Well, I was asking if it is already there, but from your answer it's probably not, is it ?
I wish I had time to learn flash... someday, maybe.
Sam -
Inappropriate?Just wanted to let everyone know that the latest OpenZoom Nano supports setting initial viewport bounds:
http://github.com/openzoom/nano
You can set them in HTML as follows:
<param
name="flashvars"
value="source=...&viewportBounds=0.2,0.5,0.5,0.4"
/>
Remember that this uses a normalized coordinate system where the the above coordinates mean (20% left, 50% right, 50% width, 40% height).
Enjoy!
Cheers,
Daniel
I’m happy
Loading Profile...



EMPLOYEE
