Convert a pattern to an image with RLE2PNG

For discussion directly related to ConwayLife.com, such as requesting changes to how the forums or home page function.
Post Reply
Book
Posts: 385
Joined: August 28th, 2021, 2:38 pm
Location: California
Contact:

Convert a pattern to an image with RLE2PNG

Post by Book » December 28th, 2021, 3:12 pm

Here's a free tool: https://golhobby.com/tools/rle2png.htm

Enter an rle in the textarea. Click a button. Get a png file to save.
Phil Bookman

hotdogPi
Moderator
Posts: 2203
Joined: August 12th, 2020, 8:22 pm

Re: Convert a pattern to an image with RLE2PNG

Post by hotdogPi » December 28th, 2021, 7:50 pm

Why not SVG?
User:HotdogPi/My discoveries

Periods discovered:

All evens ≤128 except 52,58,78,82,92,94,98,104,118,122

5-15,㉕-㉛,㉟㊺,51,63,65,73,75
1㊳㊵㊹㊼㊽,54,56,72,74,80,90,92
217,240,300,486,576

Guns: 20,21,32,54,55,57,114,117,124,126
SKOPs: 32,74,76,102,196

Book
Posts: 385
Joined: August 28th, 2021, 2:38 pm
Location: California
Contact:

Re: Convert a pattern to an image with RLE2PNG

Post by Book » December 30th, 2021, 4:40 pm

This is a tool primarily designed to make it quick and easy to get the static image for a pattern infobox in the wiki. The wiki likes PNG files.
Phil Bookman

Book
Posts: 385
Joined: August 28th, 2021, 2:38 pm
Location: California
Contact:

Re: Convert a pattern to an image with RLE2PNG

Post by Book » January 7th, 2022, 2:32 pm

hotdogPi wrote:
December 28th, 2021, 7:50 pm
Why not SVG?
RLE2SVG: https://golhobby.com/
Phil Bookman

User avatar
77551enpassant
Posts: 55
Joined: February 18th, 2022, 9:06 pm
Location: Portland, Oregon

Re: Convert a pattern to an image with RLE2PNG

Post by 77551enpassant » March 9th, 2022, 9:26 pm

Is there a tool to do this with bigger image sizes? It only goes up to 512x512 and I just want a quick way to convert an RLE into a PNG file.
Remember to keep your rhetorical weapons of pure logic holstered safely.

Book
Posts: 385
Joined: August 28th, 2021, 2:38 pm
Location: California
Contact:

Re: Convert a pattern to an image with RLE2PNG

Post by Book » March 9th, 2022, 9:54 pm

77551enpassant wrote:
March 9th, 2022, 9:26 pm
Is there a tool to do this with bigger image sizes? It only goes up to 512x512 and I just want a quick way to convert an RLE into a PNG file.
To be clear, the max. image size is 512x512, not the bounding box.

I didn't want to have larger images to avoid them being uploaded to the wiki.
Phil Bookman

User avatar
yujh
Posts: 3153
Joined: February 27th, 2020, 11:23 pm
Location: I'm not sure where I am, so please tell me if you know
Contact:

Re: Convert a pattern to an image with RLE2PNG

Post by yujh » March 9th, 2022, 10:08 pm

You might want to try giffer.pay or giffer.lua. They support arbitrarily large gifs(can be stationary, so you can convert them to png)
Rule modifier

B34kz5e7c8/S23-a4ityz5k
b2n3-q5y6cn7s23-k4c8
B3-kq6cn8/S2-i3-a4ciyz8
B3-kq4z5e7c8/S2-ci3-a4ciq5ek6eik7

Bored of Conway's Game of Life? Try Pedestrian Life -- not pedestrian at all!

User avatar
rowett
Moderator
Posts: 4570
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Convert a pattern to an image with RLE2PNG

Post by rowett » March 10th, 2022, 10:30 am

You can also do similar in LifeViewer:

Code: Select all

x = 8, y = 12, rule = B3/S23
b2o2b2o$3b2o$3b2o$obo2bobo$o6bo2$o6bo$b2o2b2o$2b4o2$3b2o$3b2o!
[[ THEME Inverse GRID GRIDMAJOR 0 AUTOFIT ]]
Use Settings->Pattern->Save Image (hotkey O).

User avatar
otismo
Posts: 1513
Joined: August 18th, 2010, 1:41 pm
Location: Florida
Contact:

Re: Convert a pattern to an image with RLE2PNG

Post by otismo » March 10th, 2022, 3:51 pm

Hey Wonderful Persons -

Thank You for all the great

Image Handling Software !

Cheer Up !
"One picture is worth 1000 words; but one thousand words, carefully crafted, can paint an infinite number of pictures."
- autonomic writing
forFUN : http://gol.jct.onl
ArtGallery : http://cgolart.onfav.net
VideoWS : http://conway.life

Sokwe
Moderator
Posts: 3367
Joined: July 9th, 2009, 2:44 pm

Re: Convert a pattern to an image with RLE2PNG

Post by Sokwe » January 19th, 2023, 4:38 am

Book wrote:
December 28th, 2021, 3:12 pm
Here's a free tool: https://golhobby.com/tools/rle2png.htm

Enter an rle in the textarea. Click a button. Get a png file to save.
Bullet51 wrote:
January 18th, 2023, 11:02 pm
The black cells in the Walrus image are misaligned.
This appears to be an issue stemming from RLE2PNG. Each on cell is placed one pixel too high, so it overlaps part of the border while leaving a white line at the bottom of the cell.

Also, the grid lines are slightly darker where the horizontal and vertical lines overlap. This isn't really a problem, but I personally prefer solid-color grid lines.
-Matthias Merzenich

Book
Posts: 385
Joined: August 28th, 2021, 2:38 pm
Location: California
Contact:

Re: Convert a pattern to an image with RLE2PNG

Post by Book » January 19th, 2023, 2:51 pm

Sokwe wrote:
January 19th, 2023, 4:38 am
This appears to be an issue stemming from RLE2PNG. Each on cell is placed one pixel too high, so it overlaps part of the border while leaving a white line at the bottom of the cell.
Should be fixed now. Walrus img has been redone and uploaded.
Phil Bookman

User avatar
dvgrn
Moderator
Posts: 11979
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Convert a pattern to an image with RLE2PNG

Post by dvgrn » October 27th, 2024, 8:25 am

The question came up on Discord this morning, as to what the best way to produce LifeWiki-compatible images.

On September 7 I tried emailing Book to see if golhobby.com might be coming back online at some point -- but didn't hear anything back.

Someone could certainly go through and rescue the source code from golhobby.com via the Internet Archive -- looks like it's probably all out there -- and get it hosted in some new location. In the absence of that happening, it looks like maybe LifeViewer is currently the best bet for easy standardized PNG generation.


Cliff notes: go to conwaylife.com and click Show Advanced Options, paste in your RLE, click Update LifeViewer, add a line like this

Code: Select all

[[ THEME Inverse GRID GRIDMAJOR 0 AUTOFIT ]]
then probably replace the "AUTOFIT" above with an appropriate exact integer zoom , like

Code: Select all

x = 8, y = 12, rule = B3/S23
b2o2b2o$3b2o$3b2o$obo2bobo$o6bo2$o6bo$b2o2b2o$2b4o2$3b2o$3b2o!
[[ THEME Inverse GRID GRIDMAJOR 0 Z 36 ]]
Then choose Settings->Pattern->Save Image -- hotkey o (lowercase, not uppercase!).

If you don't like the image dimensions, try using the LifeViewer below to get a square popup window --

Code: Select all

x = 8, y = 12, rule = B3/S23
b2o2b2o$3b2o$3b2o$obo2bobo$o6bo2$o6bo$b2o2b2o$2b4o2$3b2o$3b2o!
[[ THEME Inverse GRID GRIDMAJOR 0 Z 36 POPUPWIDTH 480 POPUPHEIGHT 480 ]]
-- or to make adjustments to the dimensions, reply to this email (without actually posting anything), change the settings above and hit Preview. 480 is the minimum width for me, but it's possible your mileage may vary -- there are some dependencies on hardware and browser settings, but the details escape me at the moment.

It all adds up to being a little bit awkward, so I hope someone does rescue the golhobby tools at some point!

User avatar
rowett
Moderator
Posts: 4570
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Convert a pattern to an image with RLE2PNG

Post by rowett » October 29th, 2024, 12:02 pm

From LifeViewer build 1205 pressing the ; (semi-colon) key will take a screenshot with the following properties:
  • Inverse Theme
  • Grid lines on with no major grid lines
  • Integer zoom

Post Reply