<commit_before>package com.mrpowergamerbr.loritta.utils.gifs

import com.mrpowergamerbr.loritta.Loritta
import com.mrpowergamerbr.loritta.utils.ImageUtils
import java.awt.image.BufferedImage
import java.io.File
import javax.imageio.ImageIO
import javax.imageio.stream.FileImageOutputStream

object CepoDeMadeiraGIF {
	fun getGIF(toUse: BufferedImage): File {
		var ogTeste = ImageUtils.toBufferedImage(toUse.getScaledInstance(45, 45, BufferedImage.SCALE_SMOOTH));

		var fileName = System.getProperty("java.io.tmpdir") + "cepo-" + System.currentTimeMillis() + ".gif";
		var output = FileImageOutputStream(File(fileName));
		val writer = GifSequenceWriter(output, BufferedImage.TYPE_INT_ARGB, 1, true)

		var fogoFx = 0;
		for (i in 0..112) {
			var ogImage = ImageIO.read(File(Loritta.FOLDER + "cepo/cepo_${i.toString().padStart(6, '0')}.png"));
			var image = BufferedImage(ogImage.width, ogImage.height, BufferedImage.TYPE_INT_ARGB);
			image.graphics.drawImage(ogImage, 0, 0, null);
			if (i in 0..16) {
				image.graphics.drawImage(ogTeste, 65, 151, null);
			}
			if (i in 17..26) {
				val fogo = ImageIO.read(File(Loritta.FOLDER + "fogo/fogo_${fogoFx.toString().padStart(6, '0')}.png"));
				image.graphics.drawImage(fogo, 55, 141, null);
				fogoFx++;
			}
			writer.writeToSequence(image);<commit_msg>Remover algumas frames no "+cepo" para diminuir o tamanho da GIF e deixar ela mais rápida<commit_after>package com.mrpowergamerbr.loritta.utils.gifs

import com.mrpowergamerbr.loritta.Loritta
import com.mrpowergamerbr.loritta.utils.ImageUtils
import java.awt.image.BufferedImage
import java.io.File
import javax.imageio.ImageIO
import javax.imageio.stream.FileImageOutputStream

object CepoDeMadeiraGIF {
	fun getGIF(toUse: BufferedImage): File {
		var ogTeste = ImageUtils.toBufferedImage(toUse.getScaledInstance(45, 45, BufferedImage.SCALE_SMOOTH));

		var fileName = System.getProperty("java.io.tmpdir") + "cepo-" + System.currentTimeMillis() + ".gif";
		var output = FileImageOutputStream(File(fileName));
		val writer = GifSequenceWriter(output, BufferedImage.TYPE_INT_ARGB, 1, true)

		var fogoFx = 0;
		for (i in 0..112) {
			val file = File(Loritta.FOLDER + "cepo/cepo_${i.toString().padStart(6, '0')}.png");
			if (file.exists()) {
				var ogImage = ImageIO.read(File(Loritta.FOLDER + "cepo/cepo_${i.toString().padStart(6, '0')}.png"));
				var image = BufferedImage(ogImage.width, ogImage.height, BufferedImage.TYPE_INT_ARGB);
				image.graphics.drawImage(ogImage, 0, 0, null);
				if (i in 0..16) {
					image.graphics.drawImage(ogTeste, 65, 151, null);
				}
				if (i in 17..26) {
					val fogo = ImageIO.read(File(Loritta.FOLDER + "fogo/fogo_${fogoFx.toString().padStart(6, '0')}.png"));
					image.graphics.drawImage(fogo, 55, 141, null);
					fogoFx++;
				}
				writer.writeToSequence(image);
			}
{'fraction_non_alphanumeric': 0.141643059490085, 'fraction_numerical': 0.024079320113314446, 'mean_word_length': 4.741869918699187, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3404364', 'n_tokens_mistral': 1183, 'n_tokens_neox': 1048, 'n_words': 189}