Announcement

  •  » Requests
  •  » Picture's data display when HD pictures are available

#1 2010-08-07 00:11:39

Eric
Former Piwigo Team
VALENCE (FR)
2005-03-25
1768

Picture's data display when HD pictures are available

Hi all!

I think it remains something illogical about the photos data display. This issue was already discussed on others forum parts (French forum mostly) but i think this important enough to have an "international" point of view:
If there are HD pictures available, would it not good to display HD size (height / width) instead of the size of their "web" version?

In my mind, if HD pics exists, they are the "originals" (understand the "reference" pictures). Typically, pictures web version are displayed with 800*600 size (this can be changed by admin). This format is locked by the gallery admin.

The only size that can vary from one picture to another is for their HD version. Therefore I propose that when HD pictures are available, data sizes displayed with metadata are from the HD version and not those of the web version.

Your feelings on this issue? I await your return to initiate a request in the bugtracker.

Offline

 

#2 2010-08-07 12:28:18

Gotcha
Former Piwigo Team
Pourrières (83) [FR]
2007-03-14
604

Re: Picture's data display when HD pictures are available

+1

Offline

 

#3 2010-08-13 11:05:27

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: Picture's data display when HD pictures are available

Currently (Piwigo 2.1), Piwigo stores the "web size" photo dimensions in the database (to avoid calculation on each page reload). This is useful for users who have set maximum width/height for web size photos at display (and some themes force this behavior).

Anyway, I agree that displaying the HD dimensions is more useful than web size photo.

Please open a bugtracker ticket.

Offline

 

#4 2010-08-13 12:48:17

Eric
Former Piwigo Team
VALENCE (FR)
2005-03-25
1768

Re: Picture's data display when HD pictures are available

Thank you to agree, plg! ;-)

[Bugtracker] ticket 1791

Offline

 

#5 2011-04-03 19:06:53

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Picture's data display when HD pictures are available

one question now (because I need this feature ^^) : how to do that ?
add a row in the db for next uploads, and calculate (and upgrading the db) for each old picture ?
or just calculate the size each time ? (as say plg it's not a very good idea, especially for little servers)

Offline

 

#6 2011-04-08 11:33:09

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Picture's data display when HD pictures are available

so I managed to add the fonction

[Subversion] r10157

in the back-office :
- add the high dimensions to the db (they are already calculated)
- calculate dimensions during local synchronisation
- calculate dimensions during distant listing

and a kind of progressive update : for each picture which has_high I verify that high dimensions exist, I not I try to calculate them (here it can fails for some remote servers... but I add the @ operator)

I choose to overwrite websize information for the displaying : if datas exist only high filesize/dimensions are displayed

Last edited by mistic100 (2011-04-08 11:33:31)

Offline

 

#7 2011-04-08 11:50:13

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: Picture's data display when HD pictures are available

mistic100 wrote:

so I managed to add the fonction

Good!

mistic100 wrote:

in the back-office :
- add the high dimensions to the db (they are already calculated)
- calculate dimensions during local synchronisation
- calculate dimensions during distant listing

What about web upload and API upload?

I think it would be easier to remove the "calculate dimensions during local synchronisation" and let your "progressive update" method do the job. No need to slow down or complexify the synchronization.

mistic100 wrote:

and a kind of progressive update : for each picture which has_high I verify that high dimensions exist, I not I try to calculate them

Excellent, that's the best way to go in my opinion.

mistic100 wrote:

(here it can fails for some remote servers... but I add the @ operator)

Hum, I don't know if it's a good idea. I know we do it on the web size, but the HD might be much bigger. Did you perform some tests on remote servers?

Offline

 

#8 2011-04-08 12:26:51

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Picture's data display when HD pictures are available

I've forgot a word ^^
- add the high dimensions to the db during upload(they are already calculated)

arg I've forgot the Webservice, will add it soon

I think it would be easier to remove the "calculate dimensions during local synchronisation" and let your "progressive update" method do the job. No need to slow down or complexify the synchronization.

I don't understand this point of view :s why not add datas during synchronisation ? yes it's a bit slower but with this way there is no slow down when a visitor load a new photo. I think admins can endure that, visitors can't :D

Hum, I don't know if it's a good idea. I know we do it on the web size, but the HD might be much bigger. Did you perform some tests on remote servers?

I've made some tests with a remote server hsted by OVH : it works fine, I've also tried the "progressive update" with a distant picture, It takes 1-2 seconds more to load the page (just the time to download the picture)

why the is the @ operator not a good idea ? If I don't add it I must try before if the file is accessible, I don't know if it is faster...

Offline

 

#9 2011-04-08 12:52:27

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Picture's data display when HD pictures are available

pwg.images.add and pwg.images.addSimple updated

Offline

 

#10 2011-04-08 13:02:50

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: Picture's data display when HD pictures are available

What about web upload? (see admin/include/functions_upload.inc.php)

Offline

 

#11 2011-04-08 13:04:13

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Picture's data display when HD pictures are available

Offline

 
  •  » Requests
  •  » Picture's data display when HD pictures are available

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact