6 Replies Latest reply on Apr 25, 2016 2:56 PM by RyanOrtgiesen

    Import bitmap compression as lossless

    RyanOrtgiesen

      Hello Animate Community,

       

      In Flash SC6, there was a preference to set import of bitmaps to lossless as well as uncheck 'allow smoothing' before import. I can't find any such preference in Animate CC. Other forums have said that you can right-click the folder which holds the imported .psd assets in the library, and set the import to 'lossless' instead of jpg, but that does not seem to be the case. As of now, my only option is to go through the hundreds of individual layers->preference-> set compression to 'lossless' and uncheck 'allow smoothing'. This will take an exorbitant amount of time. Am I missing a preference setting?

        • 1. Re: Import bitmap compression as lossless
          Colin Holgate MVP & Adobe Community Professional

          The options for smoothing and compression are in the library. Import your images, and then select them all in the library. You can set the compression and smoothing in one go, for all of them.

           

          What's the reason you would not want smoothing?

          • 2. Re: Import bitmap compression as lossless
            RyanOrtgiesen Level 1

            You can select multiple layers and go to info, then select 'lossless', but returning to the library and selecting a single layer, you'll see that it didn't actually change those settings or any setting for that matter. You have to select them one at a time and select 'lossless' for any kind of change to be permanent. As for smoothing, it makes jagged edges of pixel art retain it's original look better when position tweened. Screen Shot 2016-04-21 at 1.00.48 PM.png

            • 3. Re: Import bitmap compression as lossless
              Colin Holgate MVP & Adobe Community Professional

              I wouldn't select the layers, I would select the bitmaps in the library. Then you can change them all in one go.

               

              If you want a jaggy look to everything you should also try:

               

              stage.quality = "low";

              1 person found this helpful
              • 4. Re: Import bitmap compression as lossless
                RyanOrtgiesen Level 1

                Unfortunately, selecting multiple bitmaps is only slightly faster since .psd files are usually organized within folders and selecting those folders within the Animate library disallows you to select the lossless/ smoothing option. It took me 30 mins to select the swaths of bitmaps within each folder and convert them to lossless instead of a simple preference option that used to be in Flash. Screen Shot 2016-04-21 at 1.31.18 PM.png

                1 person found this helpful
                • 5. Re: Import bitmap compression as lossless
                  ClayUUID Adobe Community Professional

                  This is exactly the sort of thing that JSFL scripts are for. I believe this would do what you need:

                   

                  function main() {
                      var i;
                      var p = 0;
                      var items = fl.getDocumentDOM().library.items;
                      for (i = 0; i < items.length; i++) {
                          if (items[i].itemType == "bitmap") {
                              items[i].allowSmoothing = false;
                              items[i].compressionType = "lossless";
                              p++;
                          }
                      }
                      alert(p + " bitmap(s) processed.");
                  }
                  main();
                  

                   

                  Copy-paste above into a text file and save with a .jsfl extension. Double-click to run against the currently open Flash file.

                  1 person found this helpful
                  • 6. Re: Import bitmap compression as lossless
                    RyanOrtgiesen Level 1

                    Wow, thanks for looking-in to this for me. I'll try out the script. Thanks