Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output squashed at certain output widths #19

Open
gregorni opened this issue Apr 4, 2024 · 2 comments
Open

Output squashed at certain output widths #19

gregorni opened this issue Apr 4, 2024 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@gregorni
Copy link
Collaborator

gregorni commented Apr 4, 2024

I noticed this issue in Letterpress, where an image gets squashed vertically or horizontally when converting to ASCII. I couldn't really find a patter, different images seem to get squashed at different sizes.

Cube

Cube

I found this image gets especially squashed from the side at sizes above 200.

Phone

2023-02-05-15-59-45-806

I found this image gets squashed vertically at sizes below 100 and from 130-160, and squashed from the side at sizes above 170.

@FineFindus
Copy link
Owner

Could you please add an example of how to recreate the problem directly with artem, as well as run the command with --verbose trace and include its log output here.

@FineFindus FineFindus added the help wanted Extra attention is needed label May 5, 2024
@gregorni
Copy link
Collaborator Author

gregorni commented May 20, 2024

I ran it on the Cube image, here's the output.

gregorni@fedora /v/h/g/D/artem-v3.0.0-x86_64-unknown-linux-gnu> ./artem ~/Pictures/Cube.jpg --size=150 --verbose trace
[TRACE] Started logger with trace
[TRACE] Feature web_image: true
[INFO ] Checking inputs
[DEBUG] Input /home/gregorni/Pictures/Cube.jpg is a file
[DEBUG] Using default characters
[DEBUG] Characters used: 'MWNXK0Okxdolc:;,'...   '
[TRACE] Using user input size as target size
[DEBUG] Target Size: 150
[DEBUG] Scale: 0.42
[DEBUG] Invert is set to: false
[DEBUG] BackgroundColor is set to: false
[INFO ] Using colored ascii
[INFO ] Using truecolor ascii
[INFO ] Using border: false
[DEBUG] Flipping X-Axis: false
[DEBUG] Flipping Y-Axis: false
[DEBUG] Centering X-Axis: false
[DEBUG] Center Y-Axis: false
[DEBUG] Outline: false
[DEBUG] Target: Shell
[INFO ] Opening image
[DEBUG] Using inverted color: false
[DEBUG] Input Image Width: 1920
[DEBUG] Input Image Height: 1219
[DEBUG] Columns: 150
[DEBUG] Rows: 43
[DEBUG] Tile Width: 12
[DEBUG] Tile Height: 28
[INFO ] Resizing image to fit new dimensions
[DEBUG] Resized Image Width: 1800
[DEBUG] Resized Image Height: 1204
[TRACE] Created output string
[TRACE] Calculating horizontal spacing
[INFO ] Starting conversion to ascii
[INFO ] Printing output
                                                                                                                                                      
                                                                            :dOd.                                                                     
                                                                       .:dOXNNNKd:                                                                    
                                                                   .cx0XNNNNNNNXxdo,                                                                  
                                                               .cx0XXNNXK0kxNNNNkdddl.                                                                
                                                           'lx0XNXXXK0kdddolXNNNKdlddd:.                                                              
                                                       'lkKXXNXXKOkddddoc,. ONNNNxo;dxdo;                                                             
                                                   ,okKXXXXXKOxddddl:,.     oNNNNOd,;ddddl.                                                           
                                               ;okKXXXXK0Oxxddol:'        .':NNNNKdl,d:odddc.                                                         
                                           ;oOKXXXXK0kxdddoc;. ..,;:clodxxxxdKNNNNxd,lc:odddo;                                                        
                                       ;dOKXXXXK0kxdddoolccloddxxxxxddddoooolONNNNOd::cc;oddddo'                                                      
                                    ,OXXXXX0Okxxxdloooodddddddoooooollc::;,'.;NNNNKdl:,lc;odddddc.                                                    
                                    :XXXOoloool:' ,odl:clollccccc:;,,''''.....KNNNNxd:':l:'loodddd:                                                   
                                    ;XXXO::cccc;. odd;,:;'  'cc;clllllllllllllONNNNOdc.'cl; ,ooooodo'                                                 
                                    'XXXOlccoolclcxxo;'lc;,,cc',,''';:;;;;;;;;oNNNNKdl','lc;'ddlllodo                                                 
                                    .XXX0ll:doooldxxc;.llcclc'.:;..,,':::;,'.. XNNNNxd,'''lc;;dlxxkOd,                                                
                                     XXXKll,'coodxkx;,.'cllc'..c:;,.',..';;;:::ONNNWOd;.'.;lc,,:dOO0kl                                                
                                     XXXXol;   ,xkkl;''cooc'.';:,...;'...';'.cdkNWWWXxl....:l:. ;0000d.                                               
                                     KXXXol:   'kkk:;';odc',::,.;,,.'......;c;,cNWWWNxd... .cc;. k000xc                                               
                                     0XNNolc   okOo;',ddc':llc:::::;;,'....,'',cXWWWWOx;....'c:,.cOO0Od.                                              
                                     0NNNdlc  .kOO:,,ddl;;:c;cclllccc:;,.....',o0WWWWXxl.....;l:..kOO0x:                                              
                                     OXNNxlc  oOOd;;dddddddddddooooooollcc;,,,ldkWWWWWxd.....,dc. oOO0ko                                              
                                     kNNNxll .kOOc:.cllccllloooooooooddddxxxxxxxxXWWWWOx:.. ..d:. ,O000d,                                             
                                     xNNNklc.lO0x:, .cl:::ododxkkOOOOOOOkkkkk0KXNWWWWWXxdc. ..c;.  k000kl                                             
                                     xNNNklc.O00kkkkO00000000OOOkkxxxddxO0XNWWWWWWWWNXKkxxdc,.,;   cO000d.                                            
                                     xNNNOlco000OOOOkkkxxxddoooooldk0KNWWWWWWWWNXK0OOOOOOkxxdl;'    O000xc                                            
                                     dNNN0oc:looooollccc:;;,';ok0NWWWWWWWWNXK0OOOkxolxOOOOOkxddo,   d000Od.                                           
                                     oNNNKol; :lll;;,  :ldk0XNNNWWWWNNXK0OOOkdlc;..;loodkOkkkkxddo; ,0000x:                                           
                                     lNNNKol:  'cllldk0XNNNNNNWNXXK0OOOkdl:,.. ':c,.lddo:oxkkkkkxddd:lO00Oo                                           
                                     :NNNXllc .cxKXNNNNNNNNXK0OOOOxdl:..   ,;...oo:.;oddd:;;dkkkkkxxddldO0d;                                          
                                     ;NNNXxO0XNNNNNNNNXK0OOOkxoc;.... ..,cclc'. ldl';,cdddc;;ddkkkkkxxddokkl                                          
                                     'NNNNNNNNNNNXK0Okkkxoc;......,;:cllccclc:;;cdd;,. :xxdc;c;.:dkkkkkxdddd'                                         
                                     .NNNNNNXK0Okkkdl:;,,'....,',;;:::cclooooooolddl'..'cxxxc;;   ,xkkkkkxddl                                         
                                      XXK0Okkkxol:,,.  .cll::co,,kkc:.',,;:clooooooolxxxddxxxl;cxkOOOkkkkkkxd.                                        
                                      .:oxkkkkxdoolllc;..:clc;:lodddddddxxxxxxxxxxxxxxxxxxxxxdck0000OOkkkxdoc.                                        
                                          .:okkkkkxdollll::cc:cloooooooooooolllcccooddxxxxxkkO00OOkkxoc;'                                             
                                              'cdkkkkxdoolllcc;,cclc:,..    ':ldkOO000000OOOkkxol:'                                                   
                                                  ,cdkkkkxdolllldxkxc:.;ldxOO000000OOOkkxol:,.                                                        
                                                     .;ldkkkxdoollccdkkOOO000OOOkkxdl:,.                                                              
                                                         .:oxkkxxdl:dkOOOOkkxdlc,.                                                                    
                                                             .:oxxxxxkxdlc;.                                                                          
                                                                 'cc;.                                                                                
                                                                                                                                                      
gregorni@fedora /v/h/g/D/artem-v3.0.0-x86_64-unknown-linux-gnu> 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants