<commit_before>module Teaas
  class Helper
    def self.prepare_for_animation(img)
      new_img = img[0]
      new_img.dispose = Magick::BackgroundDispose
      new_img.format = "gif"
      new_img.background_color = "none"

      new_img
    end

    def self.animated_gif?(img)
      img[0].format == "GIF" && img.length > 1
    end
  end
end<commit_msg>add ability to force transparency in the helper<commit_after>module Teaas
  class Helper
    def self.prepare_for_animation(img, options={})
      new_img = img[0]
      new_img.dispose = Magick::BackgroundDispose
      new_img.format = "gif"
      new_img.background_color = options[:force_transparency] ? "transparent" : "none"

      new_img
    end

    def self.animated_gif?(img)
      img[0].format == "GIF" && img.length > 1
    end
  end
end
{'fraction_non_alphanumeric': 0.10285006195786865, 'fraction_numerical': 0.007434944237918215, 'mean_word_length': 2.9414634146341463, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4583180', 'n_tokens_mistral': 281, 'n_tokens_neox': 273, 'n_words': 59}