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

How to generate and save image of specific size? #161

Closed
PiotrNestor opened this issue Jun 3, 2020 · 13 comments
Closed

How to generate and save image of specific size? #161

PiotrNestor opened this issue Jun 3, 2020 · 13 comments

Comments

@PiotrNestor
Copy link

How to generate and save image of specific size?

Is it possible to generate an image of a specific size?

Also when in full screen (F11) and with the command dialog: (saveimg imgname)
no image file is created.

@kanurag94
Copy link
Member

kanurag94 commented Jun 3, 2020

Is it possible to generate an image of a specific size?

You can save the current canvas as .xpf file and use Render Option to generate images/ poster of specific size.

Also when in full screen (F11) and with the command dialog: (saveimg imgname)

The correct usage is (saveimg "your_file_name.png")
Thanks for pointing this out, I will update the documentation accordingly.

@PiotrNestor
Copy link
Author

This is XaoS 4.0 on Windows 10. Running from an unzipped download.

Yes, this works fine: (saveimg "your_file_name.png")

But creating an xpf file and the rendering from the command-line produces nothing.
Example fract0.xpf:

(initstate)
(filter 'anti #t)
(palette 1 16291 0)
(formula 'octal)
(maxiter 320)
(outcoloring 6)
(incoloring 2)
(view -0.47161 -0.23858 0.50409 0.50409)

Command:

xaos -render fract0.xpf

Output:
Initializing

Then nothing more

@kanurag94
Copy link
Member

But creating an xpf file and the rendering from the command-line produces nothing.

I was able to reproduce this error. PR #159 fixed this very recently. If you can build from source code, it'll work.
PS: You can use GUI meanwhile until it's included in next release.

@PiotrNestor
Copy link
Author

Yes, I've verified that '-render' works OK (on AWS Linux) when xaos is build from latest master branch.
Thanks!

@PiotrNestor
Copy link
Author

PiotrNestor commented Jun 3, 2020

I think, there is still a problem with '-render'. It's only possible to render the default Mandelbrot fractal that is loaded in xaos startup.

Example:

xaos -render  fract0.xpf -size 1920x1080 -saveimg octal.png

does not produce the Octal fractal that is defined in 'fract0.xpf'

@kanurag94
Copy link
Member

The correct usage will be

xaos -render  path/to/fract0.xpf -size 1920x1080 -basename octal

This will produce a octal0000.png inside your /bin/ folder

I can confirm this works everywhere on linux. Are you suggesting this on windows? Or is the behavior same on linux?

@PiotrNestor
Copy link
Author

OK, it's just my confusion :( and mixing commands
-saveimg should be -basename as you correctly pointed out.
Still learning the command-line possibilities ....

@PiotrNestor
Copy link
Author

OK, another -render question
What's the recommended AWS GPU instance type. g2.2xlarge ? g3s.xlarge ?
The CPU only type is just painfully slow

@kanurag94
Copy link
Member

Rendering is dependent on memory allocation inside RAM. So instead of a better GPU, try selecting a decent ssd option like r5ad.large.

PS: I don't have much experience with AWS. If you'd like to have xaos build from latest source code on your native windows machine, I might be able to help.

@PiotrNestor
Copy link
Author

I think I prefer the Linux env. Thanks for the memory config comment.

For some reason the build fails.

g++ -c -pipe -ffast-math -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wall -W -D_REENTRANT -fPIC -DUSE_LONG_DOUBLE -DUSE_SFFE -DSFFE_CMPLX_GSL -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -Isrc/include -Isrc/ui -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -I. -isystem /usr/include/libdrm -I/usr/lib64/qt5/mkspecs/linux-g++ -o qrc_XaoS.o qrc_XaoS.cpp
g++ -pipe -ffast-math -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wall -W -dM -E -o moc_predefs.h /usr/lib64/qt5/mkspecs/features/data/dummy.cpp
/usr/lib64/qt5/bin/moc -DUSE_LONG_DOUBLE -DUSE_SFFE -DSFFE_CMPLX_GSL -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --include ./moc_predefs.h -I/usr/lib64/qt5/mkspecs/linux-g++ -I/home/ec2-user/xaos -I/home/ec2-user/xaos/src/include -I/home/ec2-user/xaos/src/ui -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I/usr/include/c++/7 -I/usr/include/c++/7/aarch64-redhat-linux -I/usr/include/c++/7/backward -I/usr/lib/gcc/aarch64-redhat-linux/7/include -I/usr/local/include -I/usr/include src/ui/mainwindow.h -o moc_mainwindow.cpp
usr/include/c++/7/bits/stl_relops.:67: Parse error at "std"
make: *** [moc_mainwindow.cpp] Error 1

@kanurag94
Copy link
Member

This is probably due to Qt's way of hard coding paths.
Try one of these:

  1. Delete everything, clone & build from scratch (bad .pro file)
  2. Don't use paths with spaces in between : my path my_path
  3. Follow the wiki

@PiotrNestor
Copy link
Author

Yes, building from scratch worked better. Thanks!

@kanurag94
Copy link
Member

:) Closing this issue. Please feel free to reopen in case the issue isn't solved.

For discussions regarding XaoS join https://groups.google.com/forum/#!forum/xaos-users

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants