Missing Costumes

I'm using the online version using Chromium Version 72.0.3626.119 (Official Build) Built on Ubuntu , running on Ubuntu 18.04 (64-bit)

I'm trying to import some letter costumes via the costumes... menu item.

The Costumes pop up appears, but the only letter that appears is B (B block). No numbers either.

If I use the offline version (Snap-4.2.2.9) which I've downloaded, when I try to import any costume I just get a file open popup with a list of files - not images. Although the letters and digits appear to be there.

What am I doing wrong?

Hi colinbye,
You are not doing anything wrong.

We have to update the costumes catalog. But we have to decide what are the final list.

Right now, we have 698 pictures into the Costumes folder, and only collected 522 into the catalog (and 683 collected into the "COSTUMES-full" file).

And we know that if the catalog grows, the load time will also be bigger (and it is already slow enough). Sure, we have pending the "categories solution".

Joan

Whoa! I could have sworn I included one complete alphabet. You're right that it's silly to have just the B. I'll look into it this evening...

I would agree that the load time is long. Using the on line version with a rather old laptop with only 1GB of memory it's unusable.

Having downloaded the offline version I experimented with dragging and dropping costumes from that. While I could drag items from a file manager, I found I had problems dragging a costume from one browser window to another. It didn't seem to work with either Chromium or Firefox, but surprisingly I could drag a costume from Chromium to Firefox, but not the other way round.

Yes, increasing current load time is really unusable. Because this, Brian, I think we shouldn't add more and more costumes. I we want more costumes, we need a "categories solution".

Any way, colinbye, if you want to load costumes from files with the online version, you can drag and drop... and also, you can use the "Import" option.

Joan

I'm not proposing to add all the alphabets, but we should offer one complete alphabet, not just one letter.

Okay, I made a pull request.

A couple of suggestions.

It appears that the popup window is populated by downloading each of the full size images and then generating the thumbnails in the browser. It takes time to download several hundred images. But there is another problem - it works on my desktop with 16GB but my old laptop with just 1GB appears to page frantically.

I understand that computer games quite often "pack" small images into a single image and then "extract" the bits they need. So would it be possible to "pack" the thumbnails into a single jpeg and do something similar in snap? I not sure whether this would scale to hundreds of images.

A simpler? alternative might be to generate a single jpeg with the tumbnails and annotations which the user can scroll around. It would then be possible to work out which thumbnail had been clicked on and then just download the required full size image. Fewer downloads and possibly less memory.

The ImageMagick program has a montage option which generates such images. See https://imagemagick.org/script/montage.php

Colin

Yes, doing one of those things has been on our list since forever, but getting 5.0 out is keeping us busy, so it'll be after that. Also putting the images in folders and showing only one folder at a time.

A simpler solution is to categorize the thing like someone had done in the past in a PR (that was unpullable for other reasons).

Then you only need to load the costumes of a single category, which at most will be 15 or 20 images. Totally doable in an old machine.

Oh Yes!
You know I vote for that categorization solution!

Jens vetoed my adding those letter costumes. Instead he created a new library called "Text costumes":
Untitled%20script%20pic
Please don't ask for a font input orJens will get mad and yell at me.

By the way, putting costumes in folders is great for other reasons, but as far as speed goes, I point out that the Scratch costume dialog defaults to "all." We'll have to have an "all" even if we don't default to it, so the thumbnail solution, perhaps including @colinbye's suggested improvement using multi-thumbnail single images, will still be needed.

Yep, but we can default to some other category.

Then it's the user who decides to click on "all" and wait for the list to populate.

(that doesn't mean I disagree with keeping thumbnails of all costumes, just that as an intermediate solution, categorized costumes are low hanging fruit)

I've put together a "proof of concept" page at http://byeandbye.co.uk/snap-demo/

if you click on one of the thumbnails you get an alert which should show the file name of the full sized image. BUT it doesn't get this correct for the thumbnails after Alzono. This is because some of the costumes exist in two different file formats and my scripts don't deal with this. A fix should be straightforward.

Thanks @colinbye for your example. I know this way of using only one image is really fast.

But I continue to vote for a categorization solution. Picking costumes from 'letters', 'music', 'animals'...would be fantastic.
Joan

There's no reason to choose one over the other. We could have single pictures of each category! In fact I think it's pretty clear that we should do both.

Yes, both is fine +1:

You only need one image file however many categories you want. ImageMagick calls this a montage but I think it's often called something like a sprite sheet. The web page just selects which bits it needs.

http://byeandbye.co.uk/snap-demo/characters.htm

same image, but it just contains the letters and digits - it was relatively easy to select these.

I've "fixed" the duplicate problem by removing one of each of the duplicates