Dzi Viewer using CPP - deepzoom

I am looking for a Deep Zoom Image (DZI) viewer in CPP.
Currently, we have a viewer designed in javascript (Open Seadragon), java, and C# for the dzi images.
I am looking for the open-source viewer that can be integrated in my CPP application.

I made a tiny example program that displays a libvips image in a window:
https://github.com/libvips/vipsdisp-tiny
It's about 300 lines for the entire thing. It uses gtk+3, but it should be simple to adapt for other toolkits.
The cool thing is that it doesn't just display an image, it displays the end of a libvips pipeline, and it does it asynchronously. You can scroll around the image and the display will be updated in the background by a threadpool as chunks of the image are computed.
For your application, you could use vips_arrayjoin() to join up the tiles of the DZI image, then display the output of arrayjoin in the window.
There's a more complete image viewer here:
https://github.com/jcupitt/vipsdisp
Though I still haven't got around to finishing it, unfortunately.

Related

Does gtk support display multiple videos with gstreamer?

I've been working on a project that requires me to display multiple videos at the same time.
It's the first time I use gstreamer.
At first, I tried to use videosink to display one and use opencv and cairo to display other one,
but this failed.
And I tried to add more drawing area and use same video sink, but it came out that videos were displayed on same drawing area widget.
I also tried to add more gstvideooverlay, but this could not work.
Is it possible to display multiple videos on different drawing area widgets at the same time?
but this could not work.
is not very descriptive. It sounds like you are doing something wrong here.
On the other hand if you are developing a GTK gui application I would use gtksink or gtkglsink respectively. With these you can simply set GtkWidgets into your GUI.

Image not scaling correctly for each device screen

I am having problems with multi image in the new GUI builder. It doesn't scale as should with individual skin or device screen. Is there another way to add multi image to scale according to screen size in the code?
I got this done very well in the old GUI builder. This is preventing me from having my app update.
Open the designer and verify that the image is indeed a multi-image and that resolutions exist for all the right DPI's.
Look at the code and verify that the image is fetched using getImage(String) and isn't manipulated in any way.
Verify that you are using Label and not ScaleImageLabel or some similar class.
The Phoenix demo was created using the new GUI builder and uses a lot of multi-images.

How to set a placeholder for a Image control (while it downloads)?

I have an app that show a list of images. The image source is set to a http URL, and the images are downloaded and display automatically.
However, while the app is taking time to download, the image control shows nothing. The user experience is not good this way.
How may I display a loading placeholder image, or a loading gauge, for each of the image control?
While an image is loading, it is drawn transparently. You can use this to your advantage to display an element underneath the image while it is loading. For example, you could have a stock image that is bundled with your XAP that represents a default avatar for example. Or you could display a XAML loading animation. Then when the image is finished loading, it will obscure the element behind it.
Mick's suggestion is a good one if you need to minimize your visual tree and if your scenario allows for a code solution. This suggestion is not perfect but it does make it easier to deal with the case where your placeholder image is unscaled/centered but the loaded image is scaled/stretched.
You could set the image source to your placeholder then when ImageOpened fires, change it to the remote url and let that run it's course.
In addition to the 2 other suggestions (from Josh & Mick) you could display a placeholder in the xaml and then, in code, download the actual desired image in the background using HttpWebRequest. Then when the image has fully downloaded save it to isolated storage and then update the source to the displayed image.
Yes this is more complex than the other solutions but would simplify the visual tree and avoid a blank image being displayed while the image is downloaded.
It would also give you offline caching of images too.
Interesting how many options there are for tackling this problem.
You might also like to consider Ben Gracewood's image caching implementation or what appears to be a development on that idea in his blog comments.
One-time Cached Images in Windows Phone 7 « Ben.geek.nz
Peter Nowaks Mobile Blog - “Intelligent” Image Caching for WP 7
Some background on the discussion leading up to this here if it's of interest.
Image control cache duration?

Silverlight control view image with zoom in/out?

I wanna use an image viewer control in silverlight with feature zoom in/out the image, I found "MultiScaleImage" control that accept source as Xml file, which is can be created by "Deep Zoom Composer" program (install this program: import the images then expose and export: the program will generate the images and the "dzc_output.xml" file for you).
My Question is: I have a images(paths) that comes from the Database, how can I create the xml file at runtime without using the "Deep Zoom Composer" program!!!, I think this is impossible :(
Sooooooo anybody knows a silverlight control that I can use to view image with zoom in/out?????????
In the Deep Zoom Composer program files directory, you will find DeepZoomTools.dll
Use that to generate your images and XML,

How to show a picture using GDI?

it is possible to display a picture on a window created by winmain i mean using GDI,
i want do create a window that captures my whole screen i have done that by using GDI but unable to show an image on it how can i do so?
There are lots of good tutorials on the web.

Resources