SubImages not showing on MultiScaleImage when zoomed out. How to show them? - silverlight

I've created a deep zoom image with nearly 200 SubImages. I just loaded the main image into Deep Zoom Composer and loaded all the SubImages and exported. I then used code to position and scale the SubImages by editing the dzc_output.xml.
All seems fine apart from when I show the image. Only the SubImages from mid way down up the image show.
When I zoom in on areas where I know there should be SubImages, they do appear.
I'm I hitting some kind of limit with MultiScaleImages or is there a way to control the 'zoom' level that an image shows in the control?

I Worked it out.
Using Fiddler2 I noticed several 404, Silverlight was looking for image files in a path with /dzc_output_out_images/ as part of the path. Which didnt exist.
I'd changed the name of the dzc_output.xml file to dzc_output_out.xml.
Change the name back, all images are appearing now.

Related

Orientation error for images uploaded to GAE (GCS + get_serving_url)

We are developing an image sharing service using GAE. Many users have reported since last week that "portrait images are oriented in landscape".
We found out that from a specific timing, the specification of images uploaded and distributed through GAE has changed.
So the specs seem to have changed around 3/18 03:25(UTC) .
The "orientation" of Exif is not properly applied.
We are using GAE/Python. We save images uploaded by the users to GoogleCloudStorage, then use the URL we get with get_serving_url to distribute them.
Is this problem temporal?
Also, is it possible to return to the specs before 3/18 03:22(UTC)?
I think it happens because when get_serving_url service resize the image, it always resize the image from the longest side of the Image, keeping the aspect ration same. If you have a image of 1600x2400, then the resize image is 106x160 to keep the aspect ratio is same.
In your case one of the image is 306x408 (which is correct)as Image is resized from the height, and the other image is 360x270 (in which orientation change) the image is resized from width. I think in the later-one the orientation is changed just to keep the aspect ratio same.

ios6 UIImageView - Loading -568h image

I've seen a couple posts about the UIImage automatically loading the filename-568.png image in the new iOS6, but I can't seem to recreate it in the UIImageView class.
I'm using the Storyboard (not my app, just having to do some checks), and I've a simple layout with just the Image View scaled to fit, no code in the view controller, and I've sure the filename.png and filename-568h.png exist (as well as -568#2x.png just in case) but when I load it up in the iOS6 simulator. This has been for iOS 4 and 5, loading the #2x image for retina, doesn't seem to work in iOS6 though. Any ideas?
The image happens to be called Default.png since it is the same as the launch image, could this be the issue?
Thanks for any help in advance
iOS6 does NOT automatically load -568h as it does with the #2x images. The only exception is the default screen, but further than that you have to manually set you 568h image yourself.
I created some code to mimic the loading behavior for -568h images when using the [UIImage imageNamed:#""] method, but from the IB I do not know the way. If you are interested in such a solution, check it out at http://angelolloqui.com/blog/20-iPhone5-568h-image-loading
Typically, you should only use 568h for the launch image. If you notice yourself using different image assets within your app for the new display height, you should consider that you might be making your UI too static.
The most obvious place people want to use 568h for images is for background images. An alternative is to just have one asset that has the largest possible dimensions and align it properly using the contentMode property of UIView.
But perhaps you have something floating in the image at the top and the bottom, so contentMode doesn't solve it. You could consider that the top and bottom floaters should probably be separate views anyway.
Remember, we have always been making apps with variable heights. Every time a keyboard pops up, its as if the size of the screen has shrunk.

Drawing a XAML map in WPF

I'm working on a module that displays DWG files in WPF. I've managed to use CadLib library but it's working very slowly and I want to make it faster. I found out that if I convert that DWG file to SVG format and then print it to my XPS printer and rename the file to ZIP, I can get .page file which is basically a XAML file that displays the original SVG object in XAML.
I want to display this XAML code on a custom control and be able to pan / zoom it around. I tried to place this XAML code in a Canvas and it did manage to show up there, but now I'm stuck trying to pan / zoom the shape that was drawn there. Also, the mouse events are fired only when you click the actual drawing itself, and not the Canvas, which will be hard for the user to click...
Any help would be highly appreciated :)
You could try creating nested Canvases : One that holds the vectors and is moved on demand, one that is fixed and serves as the viewport. Haven't tried that, but it should be feasible...

Why is my WPF Frame not rendering anything? Known bug?

I have a WPF Frame with a web-based HTML source and though the contents are there, they aren't showing up. I know that the content is there because if I right click in just the right spot I can save images. Also, if I do print preview it shows just fine. The stuff is there, but it isn't showing up. Is there a known bug?
I used code from here to create a placeholder control with a window that floats right above it, so I could put the frame in the window. Its a hack but it works... sigh.

MultiScaleImage Zoom Particular Areas

I am trying to create a Deep Zoom based multiscale image that essentially has 2 views. Initially it will display a large map of the world. When the user click the USA the image should then zoom into the USA. Clicking an external button should zoom the image back out. Thats it. I don't want panning or additional zooming.
What I don't understand is how to define a "hit area" around the USA that zooms it in. Can anyone provided links to resources that explain how to do this... I never seem to find exactly what I am after?
Thanks in advance.
I can't remember the code exactly.
But if you generate a project with the source code in Deepzoom composer and then take a look at the source code.
Right down the bottom of the the Deepzoom code is a function for zooming into a LogicalPoint.
Convert the top left point of the image you are zooming into a logical point. Set this as your ViewportOrigin as this will put it in the top left.
http://blogs.msdn.com/jaimer/archive/2008/06/23/working-with-collections-in-deep-zoom.aspx This post here explains the ViewportOrigin quite well. Just remember that everything is related to the Width.
You will also need to set the the ViewportWidth.
When the ViewportWidth = 1 the whole image is displayed so it will be a fraction of the total width of the image. (USA width / WorldMap Width)
Hope this makes sense.

Resources