-
Notifications
You must be signed in to change notification settings - Fork 102
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
Adjust the rendering of PNG and SVG formats for ACS style #2175
Labels
Milestone
Comments
ljubica-milovic
changed the title
Increase the resolution and size of PNG
Adjust the resolution and size of PNG
Jul 23, 2024
AnnaKosol
changed the title
Adjust the resolution and size of PNG
Adjust the rendering of PNG and SVG formats for ACS sty]
Aug 5, 2024
AnnaKosol
changed the title
Adjust the rendering of PNG and SVG formats for ACS sty]
Adjust the rendering of PNG and SVG formats for ACS style
Aug 5, 2024
AlekseiKhariukov
assigned AleksandrParamonoff and AliaksandrDziarkach and unassigned AleksandrParamonoff
Sep 5, 2024
AliaksandrDziarkach
added a commit
that referenced
this issue
Sep 26, 2024
Also contains changes for #2246. Update code. Add UT.
7 tasks
This was referenced Sep 30, 2024
Closed
Closed
This was referenced Sep 30, 2024
AlexanderSavelyev
pushed a commit
that referenced
this issue
Sep 30, 2024
…2434) Co-authored-by: Aliakasndr Dziarkach <Aliakasndr.Dziarkach@gmail.com>
This was referenced Sep 30, 2024
This was referenced Oct 1, 2024
Closed
Verified |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Background
Currently, the settings are not supported by rendering in PNG and SVG format.
Requirements
The following parameters should be processed for rendering:
atomColoring
- existing optionrender-coloring
render-font-size
render-font-size-unit
render-font-size-sub
render-font-size-sub-unit
image-resolution
(int number, default 72 ppi)bond-length-unit
bond-length
render-bond-thickness
render-bond-thickness-unit
render-output-sheet-width
(default value: Letter format width = 11 inches)render-output-sheet-height
(default value: Letter format height = 8.5 inches)conversion from angstroms to units is done using
bond-length
. First calculate minimal bond length in angstromb_ang
(exclude zero bonds < eps=0.001) . Then takebond-length
andbond-length-unit
and calculateang_to_in
(angstorm to inch) conversion using minimal bondb_ang
. Then calculate bond length in pixels usingrender-image-resolution
e.g. if
bond-length
= 0.2 in,b_ang
= 0.9A, thenang_to_in
= 0.2/0.9 (in/A)= 0.22 in/Aif
render-image-resolution
=600ppi, and bond is 1.5A then in pixels bond_length = 600 * 0.22 * 1.5 (px). And every object in angstroms (e.g. margin size) can be recalculated to pixels asobject_size_A
*ang_to_in
*render-image-resolution
if
render-output-sheet-width
,render-output-wheet-height
are specified then render should generate output image with specified height or width. The priority should be taken to width. E.g. if width and height both specified then take width (and calculate height according to bounding box of result structure). If width is not specified, then take height. If no properties were specified the calculate image size according to average bond length.Additional information
Full JSON file of Settings is:
new JSON for settings.json.zip
The new settings
hashSpacingUnit
hashSpacing
imageResolution
related issue: epam/ketcher#5152hashSpacingUnit
values can be in cm/pt/px/inhashSpacing
number with 1 decimal placesthe settings were moved to #2246
render-image-resolution
can be high/low; PNG images should be able to be exported with the resolution of 600ppi (ACS standard preferred resolution/high resolution)> Current resolution (72ppi) is considered as low resolution.Regardless of the resolution, the size of the image should be such that one bond is ~0,5cm (0,2in/14,4pt) long when printed/100% zoom.
The new settings
bond-length-unit
bond-length
reactionComponentMarginSizeUnit
reactionComponentMarginSize
related issue: #2176The new settings
render-font-size-unit
render-font-size-sub-unit
render-bond-thickness-unit
render-stereo-bond-width-unit
related issue: epam/ketcher#5200The setting
render-bond-spacing
related issue: epam/ketcher#5154render-output-format-width
render-output-format-hHeight
are only for Indigo, Ketcher should not implement these parameters.related task: #2246
The text was updated successfully, but these errors were encountered: