If you don’t mind extra draw calls you can always use them as is.
If they are in a gui you can always add images (don’t think it works in collections, but maybe?) directly without adding them through an atlas, you will have to edit the gui as text file to do this I think.
You could also load the images as resources. But if you add them as resources they will not be compressed with the .texture_profile. But you can force that if you add all png images to a gui (you will never load this gui into the game, it is only to fool the engine to think that the resources are used this way). I did this with a python script.
script
import os
import hashlib
project_root = "/Users/mattias.hedberg/porjects/force_compression"
gui_file = os.path.join(project_root, "main/force_compression.gui")
texture_folder = os.path.join(project_root, "assets/resources/textures/")
textures = ""
names = []
for root, folders, files in os.walk(texture_folder):
for image in files:
if image.endswith("png"):
full_path = os.path.join(root, image)
name = hashlib.sha1(full_path.encode('utf-8')).hexdigest()[:5]
textures += 'textures {\n' + 'name: "{}"\n texture: "{}"'.format(name, full_path.replace(project_root, "")) + '\n}\n'
gui_file_string = 'script: ""\n{}adjust_reference: ADJUST_REFERENCE_PARENT'.format(textures)
with open(gui_file, "w") as f:
f.write(gui_file_string)
But when I think about it I am not sure if Defold adds extra padding to make them power of two. Don’t think so but maybe someone can confirm?
Note that textures added as custom_resources not being compressed have been brought up before and is marked as “will not fix” with this explanation.
“This feature would increase the size and complexity of the custom_resource functionality a lot. custom_resources was initially implemented to support loading of small data objects such as json/xml/html and not for images and textures.
Including custom textures should be solved in another way, and is not suitable for the custom_resources solution.”