Author

Topic: Parameters of signatures per rank. (Read 234 times)

legendary
Activity: 2702
Merit: 4002
December 30, 2022, 08:10:41 AM
#6
feel free to build off it, contribute to it? (It's a quick gpt build)
Can you share the results or how accurate? In general, I do not think that it will give impressive results because what is happening is not an attempt to rebuild the image pixel by pixel, but rather a visual attempt to make BBcode appear closer to the image, even if the result is different.

You can watch this video[1], try the image[2] with it using this BBcode[3] code and compare the results.

Source and thanks to @roslinpl ----> https://bitcointalksearch.org/topic/m.17430917

[1] https://youtu.be/McKHrx1tBK0
[2] image: https://i.imgur.com/gPmC4Xi
[3]

Quote
░░░░░░░▄▄▄▄▄▄
░░░░▄██████████▄
░░░██████████████
░░██████▐▌██████
█████░░░░░░░▀█████
██████▄▄░░▄▄░░██████
████████░░▀▀▄██████
████████░░▄▄▄░░█████
██████▀▀░░▀▀▀░░█████
█████░░░░░░░░█████
░░██████▐▌██████
░░░██████████████
░░░░▀██████████▀
░░░░░░░▀▀▀▀▀▀
░░░
hero member
Activity: 1438
Merit: 513
December 29, 2022, 11:30:12 AM
#5
Character count for various PX sizes doesn't this change?
There are many topics that explain how to create a signature, but I personally advise you to read ---> https://bitcointalksearch.org/topic/m.17283187
Signatures are ultimately an attempt to create images using █░▀ ▌ ▐▄ so using pt instead of px will give better results for most browsers, although the signature may stretch a bit in browsers without the other, so the smaller and coherent the signature shape, the better results you'll get .

The best signatures are those that depend on fonts without using █, and therefore BESTCHANGE signature will be good and similar for all browsers, unlike other signatures.

As for how to draw shapes, there are tools such as ASCII art generator, but the results will be dull and not good.
For the test environment, tested it on Firefox and Chrome using[1] and clicking on Preview instead of Post.


[1]
Quote
p
p
p
This post was in the money.
I know what I think I need to know now in order to proceed.
There's an obvious demand for it. Hopefully it's within my scope. Grin
Locking this , If anyone want to help shoot me a PM.
nvm maybe we can just collaborate here.
Here is a rough draft to maybe give the others an idea of what Im trying to accomplish
feel free to build off it, contribute to it? (It's a quick gpt build)

Code:
import sys
from PIL import Image

# Open the image file
with Image.open(sys.argv[1]) as image:
  # Convert the image to grayscale
  image = image.convert("L")

  # Resize the image to fit within a certain width(3888/12)?
  width, height = image.size
  aspect_ratio = height / width
  new_width = 324
  new_height = 12
  image = image.resize((new_width, new_height))

  # Iterate through the pixels in the image
  for y in range(new_height):
    for x in range(new_width):
      # Get the pixel value
      pixel = image.getpixel((x, y))

      # Determine the ASCII character to use based on the pixel value
      if pixel >= 250:
        char = " "
      elif pixel >= 245:
        char = "▟"
      elif pixel >= 240:
        char = "▞"
      elif pixel >= 235:
        char = "▝"
      elif pixel >= 230:
        char = "▜"
      elif pixel >= 225:
        char = "▛"
      elif pixel >= 220:
        char = "▚"
      elif pixel >= 215:
        char = "▙"
      elif pixel >= 210:
        char = "▗"
      elif pixel >= 205:
        char = "▖"
      elif pixel >= 200:
        char = "▕"
      elif pixel >= 195:
        char = "▔"
      elif pixel >= 190:
        char = "▓"
      elif pixel >= 185:
        char = "▒"
      elif pixel >= 180:
        char = "░"
      elif pixel >= 175:
        char = "▐"
      elif pixel >= 170:
        char = "▏"
      elif pixel >= 165:
        char = "▎"
      elif pixel >= 160:
        char = "▍"
      elif pixel >= 155:
        char = "▌"
      elif pixel >= 150:
        char = "▋"
      elif pixel >= 145:
        char = "▊"
      elif pixel >= 140:
        char = "▉"
      elif pixel >= 135:
        char = "█"
      elif pixel >= 130:
        char = "▇"
      elif pixel >= 125:
        char = "▆"
      elif pixel >= 120:
        char = "▅"
      elif pixel >= 115:
        char = "▃"
      elif pixel >= 110:
        char = "▂"
      elif pixel >= 105:
        char = "▁"
      elif pixel >= 100:
        char = "▀"
      else:
        char = " "

      # Print the ASCII character
      sys.stdout.write(char)
    # Print a newline after each row of pixels
    sys.stdout.write("\n")
#To use this script, you can pass the file name of the input image as a command-line argument. For example:
#Copy code
#python ascii_art.py image.jpg
legendary
Activity: 2702
Merit: 4002
December 29, 2022, 03:48:05 AM
#4
Character count for various PX sizes doesn't this change?
There are many topics that explain how to create a signature, but I personally advise you to read ---> https://bitcointalksearch.org/topic/m.17283187
Signatures are ultimately an attempt to create images using █░▀ ▌ ▐▄ so using pt instead of px will give better results for most browsers, although the signature may stretch a bit in browsers without the other, so the smaller and coherent the signature shape, the better results you'll get .

The best signatures are those that depend on fonts without using █, and therefore BESTCHANGE signature will be good and similar for all browsers, unlike other signatures.

As for how to draw shapes, there are tools such as ASCII art generator, but the results will be dull and not good.
For the test environment, tested it on Firefox and Chrome using[1] and clicking on Preview instead of Post.


[1]
Quote
p
p
p
sr. member
Activity: 602
Merit: 387
Rollbit is for you. Take $RLB token!
December 28, 2022, 10:08:24 PM
#3
[LEARN] BBCode Lessons & Tutorials [+tutorial videos!]
SMF Bulletin Board Code

Tools
Text Color Fader: http://patorjk.com/text-color-fader/
Testing Signature code: https://www.browserstack.com/
Quick Color Codes: https://html-color.codes/
Color From Image: https://html-color-codes.info/colors-from-image/
Convert Image to ANSI art: https://manytools.org/hacker-tools/convert-image-to-ansi-art/

Convert Tools can not provide perfect bbcode to use in signature and you must modify them to use in signature space.
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
December 28, 2022, 09:14:50 PM
#2
I did not spend long researching this but I found an ASCII art generator from text:
https://patorjk.com/software/taag/#p=testall&f=Standard&t=C

Crazy and doh look similar to the signatures I've seen on here (perhaps with some changes - like using blocks - I'm on mobile but it's alt 219 if you're on Windows or you can search it).

Converting something like the output above into something bbcode recognises is a very simple few minute task to program.

I'm not sure what you mean by the character count thing but "unlimited" is 4000 bytes afaik.
I don't know why signatures never got their own text editor in profiles.

Also I'm of the assumption you can download a validator from the signature edit page? That seems like a good idea to go as it'll cut down server load if it's done on the client end first (bitcointalk I mean).
hero member
Activity: 1438
Merit: 513
December 28, 2022, 11:20:56 AM
#1
Sorry if this has been posted before,
I'm wanting to create some sort of drag and drop img to bbcode creator.
So, here's what I know
- Newbie: No styling (including links) allowed. Max 40 characters.
- Jr. Member: Links allowed. Max 100 characters.
- Member: Unlimited length.
- Full: Color allowed.
- Sr. Member: Size allowed
- Hero: Background color allowed
Signatures taller than 42px will be cut off.

Things that would help
Character count for various PX sizes doesn't this change?

Any sort of live environment for testing that accurately replicate BCT signature paramaters?

Would anyone be willing to disclose methods for making ascii art to bbcode in the manner you guys do?
I could be wrong, but I feel there is some template you guys use to streamline your process.
I feel an ascii converter is what needs to be built on with output parameter tightened up.

I've always wondered why a tool like this hasn't been created for php boards like bitcointalk.org
I imagine there is no one size fits all solution and lots of challenges ahead if I choose to proceed.

Here is a rough draft to maybe give the others an idea of what Im trying to accomplish
feel free to build off it, contribute to it? (It's a quick gpt build)

Code:
import sys
from PIL import Image

# Open the image file
with Image.open(sys.argv[1]) as image:
  # Convert the image to grayscale
  image = image.convert("L")

  # Resize the image to fit within a certain width(3888/12)?
  width, height = image.size
  aspect_ratio = height / width
  new_width = 324
  new_height = 12
  image = image.resize((new_width, new_height))

  # Iterate through the pixels in the image
  for y in range(new_height):
    for x in range(new_width):
      # Get the pixel value
      pixel = image.getpixel((x, y))

      # Determine the ASCII character to use based on the pixel value
      if pixel >= 250:
        char = " "
      elif pixel >= 245:
        char = "▟"
      elif pixel >= 240:
        char = "▞"
      elif pixel >= 235:
        char = "▝"
      elif pixel >= 230:
        char = "▜"
      elif pixel >= 225:
        char = "▛"
      elif pixel >= 220:
        char = "▚"
      elif pixel >= 215:
        char = "▙"
      elif pixel >= 210:
        char = "▗"
      elif pixel >= 205:
        char = "▖"
      elif pixel >= 200:
        char = "▕"
      elif pixel >= 195:
        char = "▔"
      elif pixel >= 190:
        char = "▓"
      elif pixel >= 185:
        char = "▒"
      elif pixel >= 180:
        char = "░"
      elif pixel >= 175:
        char = "▐"
      elif pixel >= 170:
        char = "▏"
      elif pixel >= 165:
        char = "▎"
      elif pixel >= 160:
        char = "▍"
      elif pixel >= 155:
        char = "▌"
      elif pixel >= 150:
        char = "▋"
      elif pixel >= 145:
        char = "▊"
      elif pixel >= 140:
        char = "▉"
      elif pixel >= 135:
        char = "█"
      elif pixel >= 130:
        char = "▇"
      elif pixel >= 125:
        char = "▆"
      elif pixel >= 120:
        char = "▅"
      elif pixel >= 115:
        char = "▃"
      elif pixel >= 110:
        char = "▂"
      elif pixel >= 105:
        char = "▁"
      elif pixel >= 100:
        char = "▀"
      else:
        char = " "

      # Print the ASCII character
      sys.stdout.write(char)
    # Print a newline after each row of pixels
    sys.stdout.write("\n")
#To use this script, you can pass the file name of the input image as a command-line argument. For example:
#Copy code
#python ascii_art.py image.jpg



 
Jump to: