Announcement

  •  » Engine
  •  » [2.8] multiple formats

#1 2015-11-19 10:42:29

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

[2.8] multiple formats

Hi,

I am preparing a new feature "multiple formats". It will give the ability to have several formats for a single photo. Let's give an example to make things clear.

You will be able to have photo "img1234.jpg" (original filename) and provide a TIF, CR2 (canon raw), EPS (photoshop) all 3 associated to the same photo. All formats will be available for download.

It sounds a bit like the pwg_representative feature but it's more powerful with these important differences:

1) Piwigo doesn't try to generate a representative, it is the user who provides the photo and the "multiple formats" with no specific server-side processing

2) the user can upload many formats for the same photo, not just one.

This feature will be very useful for providing RGB + CMYK + EPS + RAW of the same photo.

For now, I focus on the synchronization process (I will work on the API/web upload as a 2nd step). First I wanted to implement the same kind of filesystem as for pwg_representative, ie :

Code:

galleries
  album-test
    img1234.tif
    pwg_representative
      img1234.jpg

which would give:

Code:

galleries
  album-test
    img1234.jpg
    pwg_format
      img1234.tif
      img1234.cmyk.jpg
      img1234.eps
      img1234.cr2

The problem is that pwg_representative already have a bug that I don't feel fine with:

Code:

galleries
  album-test
    img1234.tif
    img1234.cr2
    pwg_representative
      img1234.jpg

=> img1234.tif and img1234.cr2 have the same pwg_representative and if you delete img1234.cr2, it will delete pwg_representative/img1234.jpg and img1234.tif will lose its pwg_representative! Fixing this bug now is complicated because we would have to fix existing filenames...

One way to fix this problem, for the new multi-formats feature, would be:

Code:

galleries
  album-test
    img1234.jpg
    pwg_format
      img1234.jpg.tif
      img1234.jpg.cmyk.jpg
      img1234.jpg.eps
      img1234.jpg.cr2

=> we take the full filename before adding the format extension and not just the filename without extension. It is a constraint, since Canon/Nikon/Leica (and certainly all camera makers) are proving img1234.jpg+img1234.cr2 for Canon (or img1234.nef, for Nikon). It would mean we ask users to change filenames during the preparation.

On the other side, the issue exists only when you have several files with the same name without extension in the same folder. I don't remember any report about this problem on pwg_representative. Should I care about the same problem for multiple formats?

Offline

 

#2 2015-11-19 12:41:17

flop25
Piwigo Team
2006-07-06
7037

Re: [2.8] multiple formats

between renaming all files and renaming in case of a rare conflict which can be detected easily and which has been not reported yet, my point goes to the second one


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#3 2015-11-19 12:51:10

rvelices
Former Piwigo Team
2005-12-29
1960

Re: [2.8] multiple formats

I think we should not care about multiple formats and same file name...

It looks un-natural to have .jpg.cr2 ... Especially for the galleries part where file names form cameras could be used directly ...

Offline

 

#4 2015-11-19 12:55:29

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

Re: [2.8] multiple formats

OK. Thank you. I'm going to implement that "the simple way", which will make things easy for the majority of users.

Then I will have to think about "how to handle that in the API/web upload?". I think the important prerequisite will be to have first the basic photo, then the "formats": if Piwigo receives img1234.cr2 before img1234.jpg it won't be considered as a format, but as a non photo file which needs a representative...

Offline

 
  •  » Engine
  •  » [2.8] multiple formats

Board footer

Powered by FluxBB

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