Page 1 of 1

ZoomHeightControl Display Bug

Posted: Tue Dec 04, 2007 2:40 am
by fbmachines
I just purchased a Nikon D300 D-SLR camera and am having issues when I load a JPG from this camera into a GDViewer Control and try to use ZoomHeightControl to zoom to height. The issue is there is a black band across the bottom of the image indicating the image didn't zoom to the edge of the control. You can use the samples from Nikon to test this...
http://nikonimaging.com/global/products ... c_002b.jpg

I am using GDPicture Pro 4.4.0.2

Thanks,
Corey

Posted: Tue Dec 04, 2007 3:03 am
by fbmachines
Update...
This bug only shows up when the control's scrollbars are enabled.

Posted: Wed Dec 05, 2007 3:07 pm
by Loïc
Hi Corey,

Nice photography !

I have fixed this behaviour for the next release.

Best regards,

Loïc

Posted: Wed Dec 05, 2007 10:19 pm
by fbmachines
Hey Loïc,

I wish I could take credit for that photo but it was a sample from the Nikon Website. Thanks for the quick fix, I look forward to getting my hands on it (Also for the new Picture Changed Event).

Thanks again,
Corey

Posted: Wed Dec 05, 2007 11:11 pm
by Loïc
Hi,

I wish I could take credit for that photo but it was a sample from the Nikon Website
:lol:

I hope the next release will be available in 2 days.

Regards,

Loïc

Posted: Fri Dec 07, 2007 6:44 pm
by fbmachines
Hello,
Thanks for the update but I am still having an issue with displaying these images when the viewer is a certain size (or ratio). Try viewing and zooming to height with the sample image when the gdviewer size is 789 width and 535 height. The picture will zoom to width instead of height. Also, rotate the picture 90 degrees and resize the gdviewer control to 438 width and 641 height and perform a zoom to width. It will zoom to height instead. Sorry it is kind of hard to explain, so if you need a better explanation let me know.

Thanks,
Corey

Posted: Sat Dec 08, 2007 12:45 am
by fbmachines
Update....
I think it is misinterpreting the ratio wrong. With the dark sample picture it is kind of hard to see but if you change the ctlbackcolor to white you can see it easier.

Thanks for all your hard work.

Posted: Mon Dec 10, 2007 7:16 pm
by Loïc
Hi Corey,

This behaviour has been improved within the 4.5 release.

However if you have an image ratio which is close than the viewer ratio you can obtain a zoom by width instead the zoom by height if you are using scrollbars.


Why ?

Because if you ask to the control to adjust the image to height it will probably needs to display the horizontal scrollbar.
=> The height of the image are reduced
=> The width of the image are reduced too
=> The viewer doesn"t needs to display the scoolbar
=> The image are fitted to the width of the viewer to maximize the displayed height area. :)


I know it is a bit difficult to understand but I think it is the best way to adjust the image height to the max.

Best regards,

Loïc Carrère

Posted: Mon Dec 10, 2007 11:29 pm
by fbmachines
That seems kind of quirky. If the "zoom to width" is called, I would assume that the width of the image would span the width of the control then if the height of the image exceeds the control's height the scrollbar would come into play for the height (regardless if the ratio of the control is close to the ratio of the image). Vice versa if "zoom to height" is called. With the sample picture I linked to in the first post (width to height ratio of 1.5056179775280898), a Viewer control with a size of 789w x 515h (width to height ratio of 1.5320388349514562) through 789w x 541h (width to height ratio of 1.4584103512014787) will exhibit this behavior.

Re: ZoomHeightControl Display Bug

Posted: Thu Feb 21, 2008 3:45 pm
by fbmachines
Hey Loïc,
In v5.0 will there be a true "zoom to width" and "zoom to height" regardless if the scrollbars are used? I've stopped using this control because of this quark but would like to come back to it if this has been corrected.

Thanks,
Corey

Re: ZoomHeightControl Display Bug

Posted: Mon Feb 25, 2008 3:36 am
by fbmachines
Would you consider an option to always show the scrollbars, even when they are not needed? This option would correct this odd behavior because the image wouldn't have to be resized when the scrollbars are fit into the equation.

Thanks for listening to me rant,
Corey

Re: ZoomHeightControl Display Bug

Posted: Mon Feb 25, 2008 6:13 pm
by Loïc
Hi Corey,

It is a good idea to solve your issue.

I add this feature to the roadmap of GdPicture Pro 5.1.


Best regards,

Loïc

Re: ZoomHeightControl Display Bug

Posted: Tue Feb 26, 2008 3:02 am
by fbmachines
Fantastic! By the way, congrats on the upcoming release. I look forward to both 5.0 and 5.1

Thanks,
Corey