Topic: Image display
I would like to be able to view all my images which are saved in my database knowing that they are not in the same folders, it would be like a "viewer" in order to choose an image more quickly. How can I do it?
Destiny
My Visual Database → General → Image display
I would like to be able to view all my images which are saved in my database knowing that they are not in the same folders, it would be like a "viewer" in order to choose an image more quickly. How can I do it?
Destiny
Check out my project "Family Album". To speed things up, for each image, I create a thumbnail that is displayed in a grid. I use the tag system to search.

https://k245.ru/en/mvdb-en/family-album.html
Bonjour Destiny, Привет К245
Sur le lien donné par K245, sur la ligne de menu (Anglais) tu défiles la liste et tu cliques Français
J'ai traduit cet article cité en référence (ainsi que beaucoup d'autres).
J'en ai encore plein pour K245
Bon courage
JB
Check out my project "Family Album". To speed things up, for each image, I create a thumbnail that is displayed in a grid. I use the tag system to search.
Hi K245! I really liked your Family Album project! I encountered a problem, which I'll show in the attached photo. The first time an image is edited, when the user wants to change the mini-photo that will be displayed on the home screen, everything works correctly. If the user enters the same screen a second time, the frame displaying the mini-photo disappears. The only way to solve this is to restart the application. I tried to identify which part of the script this happens in, but my knowledge of MVD is not yet sufficient. I would appreciate it if you could fix this part.
Hi Roberto
Go to " RELEASE\Script\VClass\ImageEdit " and replace the file with this one.
Hi Roberto
Go to " RELEASE\Script\VClass\ImageEdit " and replace the file with this one.
Hi Sparrow, it worked!! Thank you so much!
Hi Roberto
Go to " RELEASE\Script\VClass\ImageEdit " and replace the file with this one.
Dear Sparrow, I have another request regarding the photo album created by K245. I don't want to abuse your willingness to always help when possible. You solved a problem, and I think K245 wasn't available to do this, but I thank you both. If possible, could you make the "delete" button on the home screen work? I don't know how to do this given the complex and efficient code created by K245. My knowledge of MVD was entirely acquired through the forum. I also ask, if possible, to include page advance on the home screen. K245 himself said that this didn't yet exist in the project. It's okay if you can't fulfill my request. What I've done so far is translate all the comments and captions into Portuguese and include the close button (sometimes hidden) on some screens, so that it's possible to close them simply with "escape". I used the MVD 5.6 form editor, but without compiling the project, keeping the execution through the executable (MVD 6.5) provided by k245. Regards.
Hi Roberto
I don't think Konstantin couldn't fix it. It's his brainchild, like many other interesting projects. As he himself writes, the project turned out to be quite complex and large. During and after his work on it, it was rethought. Perhaps it will evolve into something else as a sequel.
Besides, there are internet issues.
Konstantin describes all projects in sufficient detail to teach others. But it doesn't always find user feedback due to the programming style, which is difficult for beginners. But you have to study.
I know there are some flaws, some inaccuracies, and some unfinished parts of the program.
I'll see what can be done.
Google translate.
Hi Roberto
I don't think Konstantin couldn't fix it. It's his brainchild, like many other interesting projects. As he himself writes, the project turned out to be quite complex and large. During and after his work on it, it was rethought. Perhaps it will evolve into something else as a sequel.
Besides, there are internet issues.
Konstantin describes all projects in sufficient detail to teach others. But it doesn't always find user feedback due to the programming style, which is difficult for beginners. But you have to study.
I know there are some flaws, some inaccuracies, and some unfinished parts of the program.
I'll see what can be done.Google translate.
Hi Sparrow, I want to clear up a misunderstanding. I think k245 has a lot of technical expertise to make the corrections to the project. What I meant was that he might not have the time available. Regards.
Page navigation has been added.
Inaccuracies, including mine, have been corrected.
Errors are possible.
Hi Sparrow! I tested the "delete" button and the page advance. Everything is working perfectly. It's fantastic! Other users will certainly be happy with this too. Thank you very much. Thanks also to K245 for being the author of this project.
Colleagues, I'm very glad that the "Family Album" project has interested you enough to dive into making improvements. Unfortunately, I currently don't have enough time to continue developing it myself, so I've provided all the source code for free use. I wish you success in your endeavors and projects.
P.S. I'm still hoping to return to the MVDB projects and continue sharing my stories about programming.
Hi all,
Added to previous improvements:
! Thumbnail loading time has been accelerated when refreshing the panel and switching pages.
! Changes have been made to the form resize and thumbnail selection events.
Other improvements.
Previous fixed versions have been removed from the forum.
Hi all,
Added to previous improvements:
! Thumbnail loading time has been accelerated when refreshing the panel and switching pages.
! Changes have been made to the form resize and thumbnail selection events.
Other improvements.Previous fixed versions have been removed from the forum.
Hi Sparrow, the improvements you made are great. The thumbnail loading was really slow... If I may offer a few suggestions (you've already done a lot for this project), provided you have the time and inclination:
- Some screens could be closed with "escape," especially the initial screen.
- When the initial screen has more than one page of thumbnails, two thumbnails are missing to complete the first page...
- In the slideshow presentation, making the "full screen" and "setup" buttons functional would be nice. The "setup" button could allow the user to change the display time per slide.
Thank you and best regards.
Hi Roberto
Could you elaborate on this?
- When the initial screen has more than one page of thumbnails, two thumbnails are missing to complete the first page...
A screenshot would be ideal.
As for finalizing the project, it's all in your hands. I'm just trying to fix a few things or do things differently. For me it's a good study...
P.S.
I understand what you're talking about.
In Project K245, the program was configured to display 30 thumbnails per screen (you see three rows of eight thumbnails, plus six more), which was optimal at the time. When I made changes to the code that sped up thumbnail display, I didn't change the number of thumbnails displayed. The trick is that if display scaling is applied in Windows, the layout changes. It also changes when the window is resized or maximized to full screen.
Hi Roberto
Could you elaborate on this?
- When the initial screen has more than one page of thumbnails, two thumbnails are missing to complete the first page...
A screenshot would be ideal.
As for finalizing the project, it's all in your hands. I'm just trying to fix a few things or do things differently. For me it's a good study...
P.S.
I understand what you're talking about.
In Project K245, the program was configured to display 30 thumbnails per screen (you see three rows of eight thumbnails, plus six more), which was optimal at the time. When I made changes to the code that sped up thumbnail display, I didn't change the number of thumbnails displayed. The trick is that if display scaling is applied in Windows, the layout changes. It also changes when the window is resized or maximized to full screen.
Hi Sparrow, screenshot attached. I put it in full screen and the problem persists. It's just a cosmetic detail and doesn't interfere with operation. It's fine if it's not possible to change. Regards
Hi all,
ESC exit added to some forms.
The FullScreen button has been enabled.
Two thumbnails have been added to the main screen.
Thumbnail cropping behavior has been changed:
- When adding an image, the default thumbnail is the entire image.
- The ability to crop a thumbnail of any size.
- Thumbnail cropping within the image boundaries.
Other changes...
Hi all,
ESC exit added to some forms.
The FullScreen button has been enabled.
Two thumbnails have been added to the main screen.
Thumbnail cropping behavior has been changed:
- When adding an image, the default thumbnail is the entire image.
- The ability to crop a thumbnail of any size.
- Thumbnail cropping within the image boundaries.
Other changes...
Hi Sparrow! I tested the improvements you implemented in the Photo Album project, created by K245:
- "ESC" on certain screens.
- Full screen in the "Slides" form.
- Full filling of the initial screen with thumbnails.
- Automatic cropping when adding new images.
- Thumbnail cropping of any size, which allowed zooming in on any part of the image!
Everything looks great! Congratulations and thank you. Best regards.
begin
//Change caption and hint to the Portuguese language and etc.
frmImage.Caption := 'Álbum de Fotografias';
frmImage.btnDelete.caption := 'Excluir';
frmImage.btnEdit.caption := 'Editar';
frmImage.btnNew.caption := 'Adicionar';
frmImage.btnPlay.caption := 'Slides';
frmImage.chbOR.caption := 'OU';
frmImage.chbShowPreview.caption := 'Visualizar';
frmImage.chbTag.caption := 'TAG';
frmImage.labDescription.caption := 'Descrição';
frmImage.labName.caption := 'Nome';
frmImage.btnFirst.Hint := 'Vai para a primeira página';
frmImage.btnLast.Hint := 'Vai para a última página';
frmImage.btnNext.Hint := 'Vai para a página anterior';
frmImage.btnPred.Hint := 'Vai para a primeira página';
frmImage.btnTag.Hint := 'Selecione as tags do diretório';
frmImage.edtFilter.Hint := 'Clique 2x para limpar filtro.';
frmImage.edtFilter.TextHint := 'Busca por marca (TAG)';
frmImage.Epage.Hint := 'Entre com a página e pressione ENTER';
frmTag.Caption := 'Marcação (TAG)';
frmTag.btnClear.Hint := 'Limpar seleção';
frmTag.btnDelete.Caption := 'Excluir';
frmTag.btnEdit.Caption := 'Editar';
frmTag.btnNew.Caption := 'Adicionar';
frmTag.btnSelect.Caption := 'Selecionar';
frmTag.labTagCategory.Caption := 'Categoria:';
frmTagEdit.Caption := 'Marcação (TAG)';
frmTagEdit.btnCancel.Caption := 'Cancelar';
frmTagEdit.btnSave.Caption := 'Salvar';
frmTagEdit.labCategory.Caption := 'Categoria';
frmTagEdit.labName.Caption := 'Marcação (TAG)';
frmTagCategory.Caption := 'Categorias das TAGs';
frmTagCategory.btnDelete.Caption := 'Excluir';
frmTagCategory.btnEdit.Caption := 'Editar';
frmTagCategory.btnNew.Caption := 'Adicionar';
frmTagCategory.tgrMain.dbListFieldsNames := 'Categoria';
frmTagCategoryEdit.Caption := 'Categoria';
frmTagCategoryEdit.btnCancel.Caption := 'Cancelar';
frmTagCategoryEdit.btnSave.Caption := 'Salvar';
frmTagCategoryEdit.labName.Caption := 'Nome';
frmImageEdit.Caption := 'Edição de imagem';
frmImageEdit.btnCancel.Caption := 'Cancelar';
frmImageEdit.btnEdit.Caption := 'Editar';
frmImageEdit.btnSave.Caption := 'Salvar';
frmImageEdit.Label1.Caption := 'Nome';
frmImageEdit.Label2.Caption := 'Descrição';
frmImageEdit.Label3.Caption := 'Data/hora de criação';
frmImageEdit.Label4.Caption := 'Pré-visualização';
frmImageEdit.Label5.Caption := 'Marcação (TAG)';
//frmImageEdit.imgPreview.Hint := 'Clique 2x para abrir arquivo abaixo se existir.';
frmImageEditor.caption := 'Inclusão de Foto e Edição de Miniatura';
frmImageEditor.btnCancel.caption := 'Cancelar';
frmImageEditor.btnClear.caption := 'Limpa';
frmImageEditor.btnFilter.caption := 'Carrega';
frmImageEditor.btnSave.caption := 'Salvar';
frmShow.caption := 'Slides';
frmShow.btnFirst.Hint := 'Primeiro Slide';
frmShow.btnFullScreen.Hint := 'Tela cheia';
frmShow.btnLast.Hint := 'Último Slide';
frmShow.btnNext.Hint := 'Próximo Slide';
frmShow.btnPred.Hint := 'Slide Anterior';
frmShow.btnSettings.Hint := 'Setup';
frmShow.labDescription.caption := 'Descrição';
frmShow.labName.caption := 'Nome';
frmShow.btnPlay.Hint := 'Exibe Slides sequencialmente';
//It improved the display of full-screen forms and their buttons on my computer.
frmImage.WindowState := wsMaximized;
frmImageEditor.WindowState := wsMaximized;
frmImageEdit.WindowState := wsMaximized;
end.Backup Routine (I combined 2 scripts from the forum):
1 - backs up the sqlite.db file, but MVD doesn't allow compression.
2 - creates a zipped backup of the "image" folder, which contains the photos.
procedure frmImage_btn_bkp_OnClick (Sender: TObject; var Cancel: boolean);
var
SaveDialog: TSaveDialog;
sFileName,sDirName: string;
begin
showmessage('Para iniciar Backup do Banco de Dados pressione OK');
sFileName := 'Sqlite-' + FormatDateTime('dd-mm-yyyy hh-nn-ss', now)+'.db';
SaveDialog := TSaveDialog.Create(frmimage);
SaveDialog.FileName := sFileName;
SaveDialog.Filter := 'Database|*.db|Any file|*.*';
SaveDialog.Options := ofOverwritePrompt+ofHideReadOnly+ofEnableSizing;
if SaveDialog.Execute then
begin
CopyFile(ExtractFilePath(Application.ExeName)+'sqlite.db', SaveDialog.FileName);
ShowMessage('Banco de dados foi salvo na pasta especificada');
end;
SaveDialog.Free;
showmessage('Para iniciar Backup da pasta de imagens pressione OK');
sDirName := 'Imagens-' + FormatDateTime('dd-mm-yyyy hh-nn-ss', now)+'.zip';
SaveDialog := TSaveDialog.Create(frmimage);
SaveDialog.FileName := sDirName;
SaveDialog.Filter := 'Selecione uma pasta para salvar|*.*';
SaveDialog.Options := ofPathMustExist + ofEnableSizing;
if SaveDialog.Execute then
begin
frm_aviso.Show;
CompressZipDirectory(ExtractFilePath(Application.ExeName)+'image\', SaveDialog.FileName);
frm_aviso.close;
ShowMessage('Imagens foram salvos na pasta especificada');
end;
SaveDialog.Free;
end;Hi Roberto
The code allows you to compress the sqlite.db file using Windows tools in zip format without additional copying and compression operations.
Caution: TDataSet resources must be freed.
Hi Roberto
The code allows you to compress the sqlite.db file using Windows tools in zip format without additional copying and compression operations.
Caution: TDataSet resources must be freed.
Hi Sparrow, thank you for resolving the sqlite.db zipping issue.
I made some modifications to the "Family Album" project, created by K245 and which received corrections and improvements from Sparrow, listed below:
01 - Translation of the "captions" (names of forms, labels and buttons) into Portuguese through instructions included at the end of the script between BEGIN and END.
02 - In the search field on the main screen, I included:
* Search by CATEGORY by simply typing the name, after unchecking the "TAG" and "OR" checkboxes. In the previous form, the user had to select all the TAGs of a category.
* The content of the search field is cleared with 2 clicks.
03 - Inclusion of a "NO TAG" button for searching for photos without TAGs, considering that photos without TAGs do not have an associated category, which can be more easily corrected with this.
04 - Inclusion of a Backup button, which zips the "sqlite.db" database and the "image" folder, which contains the photos. Sparrow provided the script for zipping the database.
05 - In the "image editing" form, below the thumbnail and TAG field, I included a field that gives access to a folder selected by the user and another that executes a file also chosen by the user. When one of these fields is filled in, a red bar appears over the thumbnail with the title "Double Click". When clicked, the folder is opened or the file is executed. I included this option in case the user has many folders with photos. Thus, they can choose one photo from each folder. I chose to convert the photos from a folder into a single PDF file, which is opened when I double-click on the thumbnail. The use of this feature is optional.
I made some modifications to the "Family Album" project, created by K245 and which received corrections and improvements from Sparrow, listed below:
01 - Translation of the "captions" (names of forms, labels and buttons) into Portuguese through instructions included at the end of the script between BEGIN and END.
02 - In the search field on the main screen, I included:
* Search by CATEGORY by simply typing the name, after unchecking the "TAG" and "OR" checkboxes. In the previous form, the user had to select all the TAGs of a category.* The content of the search field is cleared with 2 clicks.
03 - Inclusion of a "NO TAG" button for searching for photos without TAGs, considering that photos without TAGs do not have an associated category, which can be more easily corrected with this.04 - Inclusion of a Backup button, which zips the "sqlite.db" database and the "image" folder, which contains the photos. Sparrow provided the script for zipping the database.
05 - In the "image editing" form, below the thumbnail and TAG field, I included a field that gives access to a folder selected by the user and another that executes a file also chosen by the user. When one of these fields is filled in, a red bar appears over the thumbnail with the title "Double Click". When clicked, the folder is opened or the file is executed. I included this option in case the user has many folders with photos. Thus, they can choose one photo from each folder. I chose to convert the photos from a folder into a single PDF file, which is opened when I double-click on the thumbnail. The use of this feature is optional.
P.S.: I forgot to mention:
* At the top of the "TAG" grid, I included a button to call "Categories" directly;
* In the TAG and Category grids, I included a column with the total number of photos that use a specific TAG or category. This makes it easier to delete TAGs or Categories without any linked photos.
* I created a view - it's in the script - that is used to display only photos whose categories have the new "hide" field = false (or zero in SQL), which can be filled in during category registration. Thus, if one or more photos have a single TAG linked to a "hidden" category, these photos will not be displayed.
My Visual Database → General → Image display
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi