This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 4 - Pages: 1 - Last Post: 27 Oct 22, 13:38 Last Post By: JeffTucker Threads: [ Previous | Next ]
JeffTucker

Posts: 8,090
Registered: 31-Jan-2006
Deleting unused images when changing output format
Posted: 20 Oct 22, 17:17
 
  Click to reply to this thread Reply
(Mentioned in an email - posting here so I don't lose track of it....)

If you add mydog.jpg and mycat.JPG to a project, and choose JPEG as the output format, you get slides/mydog.jpg and slides/mycat.JPG. If you switch to WebP as the output format, you end up with slides/mydog.webp, slides/mycat.webp, and slides/mycat.JPG.

In short, if the file extension isn't lower case, the unused output format isn't deleted when it should be.
MarkusD

Posts: 759
Registered: 13-Apr-2006
Re: Deleting unused images when changing output format
Posted: 20 Oct 22, 20:13   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
I'm surprised that the core doesn't change all file extension to lower case by default. This would make things much easer, doesn't it? So for example in a tool you can assume that the file extension of every file is lower case, there is no guessing, no errors at all.
JeffTucker

Posts: 8,090
Registered: 31-Jan-2006
Re: Deleting unused images when changing output format
Posted: 20 Oct 22, 21:40   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
I usually rail against software that does me a "favor" ("Surely, he'll want it this way!"), but in this case I can't think of a good reason for preserving the original extension case. No skin developer should be hard-coding file names, so if the core correctly feeds me imagePath and originalPath, with the extension that it is producing, everything should be fine.
davidekholm

Posts: 3,699
Registered: 18-Oct-2002
Re: Deleting unused images when changing output format
Posted: 27 Oct 22, 13:06   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
Now fixed in v29.1b3. This version also fixes the same issue with source files named mydog.jpeg (notice "jpeg" instead of "jpg")

All at: https://jalbum.net/forum/thread.jspa?messageID=358769&#358769

I will consider streamlining how file extensions are produced, but will stick to the current scheme of trying to respect the input format style for now.
JeffTucker

Posts: 8,090
Registered: 31-Jan-2006
Re: Deleting unused images when changing output format
Posted: 27 Oct 22, 13:38   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
Now fixed in v29.1b3. This version also fixes the same issue with source files named mydog.jpeg (notice "jpeg" instead of "jpg")

That's better. :)

I will consider streamlining how file extensions are produced, but will stick to the current scheme of trying to respect the input format style for now.

Despite my reply to MarkusD, above, I do have this nagging feeling that forcing everything to lower case, and also maybe forcing jpeg to jpg, might produce some unwelcome surprises. Can't quite put my finger on it....
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums