Align plugin to flat image border

  • I'm using krpano to display some planar photos using the cylinder hfov="1" method. Everything works fine, except when the pictures are zoomed out (all of the picture is visible) there are black bars on the sides (as intended) and the copyright/creative commons notice I have overlaid onto the panoramas is now on the black bar, leaving the entire photo unmarked for everyone to screenshot. Is there a way to align a plugin to the edge of the photo?

  • yes,

    just align="rightbottom" x="100" y="100" keep="true"


    that should work when u put that in your plugin that is the logo..

    hope it helps

    Cheers

    Tuur *thumbsup*

  • add parent="plugin-name" to the copyright plugin. plugin-name should be the photo/plugin you want the copyright to sit on top of. Once that is done the align and position attributes are based off the parent plugin not the stage. if you choose align="center" and edge="center" you should be able to get the copyright plugin to sit directly in the center of the parent plugin.

  • It's a normal flat image rendered as a panorama using the same method as the make pano (flat) droplet uses - cylinder type with hfov="1". I do have the creative commons notice as a plugin aligned to the bottom right corner, but I'm aware that if I make it a hotspot, I can pin it on a specific location of the "panorama". The problem with that method is that I still have to manually specify the location for each picture. Since there will be lots, I was looking for a method to always/automatically pin a plugin, hotspot or whatever to a position on the partial panorama aligned with the end of the visible part (no matter what size or shape the image has) so the user can't pan the image out from underneath it...

    Code
    <view hlookat="0" vlookat="0" limitview="fullrange" />
    	<preview type="CYLINDER" url="?a=t" />
    	<image type="CYLINDER" hfov="1.00">
    		<cylinder url="£P£/£F£.jpg" />
    	</image>

    (limitview="fullrange" doesn't have to stay if there's a different view mode that allows me to do what I want to do...)

  • Do you have some pixels that make that border or is an 'area' thing ... that would make it much easier..

    parent STAGE..

    so this is an action, when u click on a button or so then this action happens but you could trigger that action from the start... so make an area as you like.. an place the hotspot parent STAGE on the right position in absolute numbers or in %...

    that was another area example..


    do something like this if you like a picture as an background..

    Code
    <plugin name="background" url="buttons/hout.jpg" preload="true" width="100%" height="100%" keep="true" parent="BGLAYER" visible="true" enabled="false"  />

    you can also do this in the index with the background color...

    hope it helps...

    cheers
    tuur *thumbsup*

    Tuur *thumbsup*

  • Parent="stage" does not do it because the stage is still 100% but the image with hfof="1" only takes a portion of the stage. Perhaps try adding the image as a plugin instead of using the image tags.

  • ooo.. then i didn't understand the question corectly.. *cry*

    sorry

    maybe parent="area" then.. *confused*

    have to go now..
    see you in 2 weeks..


    tuur

  • I wanted to use hotspots and encryption on the flat images as well, but I guess I'll have to forget all that and make a plugin to display them. Thanks anyway.

    Klaus, suggestion: limitview="fullstretch" which ensures the viewer area is always entirely filled with the flat image (never any black bars, user may have to pan either horizontally or vertically to see the whole image).

  • Hi,

    you would need to use <hotspot> in that case to align an image on the pano,
    <plugin> will always refer to the screen/window,

    and you would need to know the right/bottom coordinates of the pano,

    when "hfov" is "1.0" then the "ath" coordinate will be "+0.5",
    the "vfov" will be normally calculated automatically, you would
    need to calculate it manually (e.g. vfov = hfov*panoheight/panowidth),
    and then set "atv" to the vfov/2, e.g. "+0.1",

    then use edge="rightbottom" to align the image with it's right bottom edge
    at that coordinates,

    e.g.

    Code
    <hotspot name="logo=" url="logo.png" edge="rightbottom" ath="+0.5" atv="+0.1" />

    best regards,
    Klaus

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!