Topic: Zoom photo

Hello, I would like to know if in MVD it is possible to zoom in on a photo in order to see more detail.

Destiny

Destiny

Re: Zoom photo

Hello Destiny

Tu pourrais essayer ce code derrière une bouton BtnZoom

// Redimensionne le BitMap
  Image1.Picture.Bitmap.Width  := round(Image1.Picture.Bitmap.Width  *1.1);
  Image1.Picture.Bitmap.Height := round(Image1.Picture.Bitmap.Height *1.1);

  // Redimensionne le "conteneur" Timage dans le scrollbox
  Image1.Width  := round(Image1.Width  *1.1);
  Image1.Height := round(Image1.Height *1.1);

  // Copier aux nouvelles dimensions
  Image1.Picture.Bitmap.Canvas.StretchDraw(Image1.Picture.Bitmap.Canvas.ClipRect,B);
Je vais tester ce code et revenir vers toi.

Par contre j'ignore si MVD permet de travailler sur les Canvas, j'ai déjà rencontrer des refus de sa part.

You could try this code behind a BtnZoom button

  // Resize the BitMap
   Image1.Picture.Bitmap.Width: = round (Image1.Picture.Bitmap.Width * 1.1);
   Image1.Picture.Bitmap.Height: = round (Image1.Picture.Bitmap.Height * 1.1);

   // Resize the Timage "container" in the scrollbox
   Image1.Width: = round (Image1.Width * 1.1);
   Image1.Height: = round (Image1.Height * 1.1);

   // Copy to the new dimensions
   Image1.Picture.Bitmap.Canvas.StretchDraw (Image1.Picture.Bitmap.Canvas.ClipRect, B);
I will test this code and get back to you.
On the other hand I do not know if MVD allows to work on the Canvas, I have already met refusals from him

JB

3 (edited by derek 2021-11-14 00:40:57)

Re: Zoom photo

Salut Destiny, Salut Jean,
Another option might be to place the image on a discrete form, make the form draggable,  make both the form and the image 'stretchable' and then use a small script to alter the size of the image as the form is dragged (please see the attached). 
To see it working, click in the Photo* column on the tablegrid and then drag 'formimage'  (click on any other column to edit the record as normal).
Strictly speaking, it's 'enlarging' rather than 'zooming in' but the end result is much the same.
Maybe this gives you some ideas.
Derek.

Post's attachments

Attachment icon zoomin.zip 824.86 kb, 212 downloads since 2021-11-14 

Re: Zoom photo

Thanks to Jean and Derek for their efforts but it works for enlargements but not for zooms. What I am looking for is to be able to enlarge a detail on a stamp, ie enlarge the image and then zoom in on a detail. I don't know if this is possible with MVD.

Merci a Jean et a Derek pour leurs efforts mais cela fonctionne pour les agrandissements mais pas pour les zooms. Ce que je recherche c'est de pouvoir agrandir un détail sur un timbre, c'est a dire agrandir l'image puis de zoomer sur un détail. Je ne sais pas si c'est possible avec MVD.

Destiny

Destiny

Re: Zoom photo

Hello Destiny, Hllo Derek

What would you like is a movable magnifying glass effect like on the Wikitimbres site?
https://www.wikitimbres.fr

Ce que tu voudrais c'est un effet de loupe déplaçable comme sur le site de Wikitimbres ?
https://www.wikitimbres.fr

JB

6 (edited by Destiny 2021-11-22 08:29:57)

Re: Zoom photo

Hi Jean, yes a mobile magnifier effect looks perfect to me this is exactly what I need but how to apply it or something similar. Do you have an idea?

Destiny

Destiny