转跳到内容

tetrohedro

【会员】精英会员
  • 内容数

    1,001
  • 加入

  • 最后访问

  • 赢得天数

    6

tetrohedro 发表的所有内容

  1. 理想的版本一定会动起来的~ (虽然我的实验都失败了)
  2. ID tetrohedro 二次元人设 阿卡林 特技 在奇怪的地方花费大量的精力 找到ss的过程 来自神的启示 崇高追求 考古 对坛坛/论坛的悄悄话 秘密 人设图 对坛坛/论坛的悄悄话:做人设图好难,为什么图片最大只能100KB啊
  3. 钱包系统的开发者Adriano已经跑路了。 我不是100%确定同盟是否用的是已经跑路的Adriano做的钱包系统,希望不是...... 只能躺平了
  4. 仰视。 我已经做好观看的准备了~! 希望黄金乡篇的作画能够比考试篇更好。 很久以前。
  5. 我的天性并不是水系 我现在还是认为去年是2020年....... 我是2020年开始学习编程的。
  6. 提问:曾经有人实现过吗? 同盟有着漫长的历史,也许已经有人实现了这个成就,在某个被封印的贴子里..... (不过应该可能极小,因为这个论坛用的是Invision Community V4, 是一个老牌论坛解决方案,估计不好突破) 不过同盟的钱包系统感觉危啊,希望用的解决方案不是作者已经跑路的Members Shop。 https://www.sosinvision.com.br/index.php?/forums/topic/1510-eol-members-shop/
  7. 555 只有水元素能拯救我了
  8. 我现在连签到贴都无法回复
  9. 我要成为考古学家! 也许很多的秘密就藏在曾经的帖子的背景里。 失落的历史就由我来揭开。
  10. 是的是的~ 贴贴 让我们一起开始练习腹击吧! 感谢千瓦时当时做汉化。
  11. 我在综合事务所无法发帖 只能等待自由的那一天了
  12. 这就是残酷的现实吗。 我也注意到了,很多内联样式会失踪.....
  13. 极限一定会被突破的! 虽然我没有思路,但是我相信后生可畏!
  14. 我要速通穿越!没有障碍能阻挡我。 可惜同盟的每日签到系统不是点击特定按钮签到,而是回复指定帖子签到。 很多论坛的每日签到系统有Bug,只要在极短时间内签到多次,就能绕过每日签到只有一次的限制.......
  15. 正在头脑风暴中 比如我们可以在图表的背景图片中藏一段文字,这样直接读HTML就读不出来了。 Kris神教是真的!
  16. 是的,刚写的! 为了表达我对你的排版技术的憧憬,我抱着热情写下了这个脚本。 不过失败了很多次...... 这个论坛会给表格加很多CSS Style,所以需要调试。
  17. 好开心! 这个游戏好好玩,以后可不可以做类似的解密企划?隐藏一段秘密,解密即可获得奖励。
  18. 诈骗失败 X2 前面一直在研究前辈和其他人的排版,然后就和Claude一起手搓了一个自动根据图片排版的Python脚本。 #!/usr/bin/env python3 """Convert an image to an HTML table where each cell represents a pixel.""" from PIL import Image import sys import os def image_to_html_table(image_path, output_path, width=120): """Convert an image to an HTML table. Args: image_path: Path to the input image output_path: Path for the output HTML file width: Target width in cells (height calculated to maintain aspect ratio) """ # Load the image img = Image.open(image_path) # Calculate new height to maintain aspect ratio aspect_ratio = img.height / img.width height = int(width * aspect_ratio) # Resize the image img = img.resize((width, height), Image.Resampling.LANCZOS) # Convert to grayscale img = img.convert('L') # Get pixel data pixels = list(img.getdata()) # Build HTML html = """<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Bad Apple - HTML Table</title> </head> <body> <table style="border-collapse:collapse;table-layout:fixed"> """ # Generate table rows for y in range(height): html += " <tr>" for x in range(width): pixel_value = pixels[y * width + x] # Convert grayscale to hex color hex_color = f"#{pixel_value:02x}{pixel_value:02x}{pixel_value:02x}" html += f'<td style="background-color:{hex_color};width:6px;height:6px;padding:0;line-height:0"></td>' html += "</tr>\n" html += """ </table> </body> </html> """ # Write output with open(output_path, 'w') as f: f.write(html) print(f"Generated HTML table: {output_path}") print(f"Dimensions: {width}x{height} cells") if __name__ == "__main__": if len(sys.argv) < 2: print("Usage: python image_to_table_v2.py <image_path> [width]") sys.exit(1) image_path = sys.argv[1] # Derive output path from input filename base_name = os.path.splitext(os.path.basename(image_path))[0] output_path = f"{base_name}_table.html" # Optional: accept width from command line width = int(sys.argv[2]) if len(sys.argv) > 2 else 120 image_to_html_table(image_path, output_path, width)
  19. 我的近视眼又加深了一点 我是第一个吗!? 我要尝试认领20节操!如果我是四个月第一个发现的人的话,能不能多给一些。
  20. 先做出不会动的Bad Apple,才能做出会动的Bad Apple。 不过我怀疑静态效果可能是排版系统的极限了。这个系统似乎不支持动态效果,最后的结果只会一动不动。
  21. 我强烈推荐....... 外道勇者一行!~! 剧情轻松,牛度适中,和来自深渊一样,都是需要放松时可以轻松享受的作品。 (无辜的双眼)
  22. 复杂的排版的确会让人感到头疼呢 不过排版同时也很有趣!同盟的前辈们用排版做出了很有趣的效果,我也要向他们学习!
×
×
  • 新建...

重要消息

为使您更好地使用该站点,请仔细阅读以下内容: 使用条款