News:

Please remember to do a search before you ask a question!

Main Menu
TurboCAD 2026 Platinum box
Now available

TurboCAD 2026.2

The latest update for TurboCAD 2026. It installs over any 2026 build and keeps your activation, drawings and settings. Get it from the Start Page or Help > Check for Update.

Formula for extra pixels as image border

Started by Orion20036, July 28, 2010, 04:33:09 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Orion20036

Can anyone at imsi give me the formula used to calculate the extra border pixels on a saved jpeg image. I need to have a finished size image of the appropriate dimensions, so when I crop it is not a hit and miss event. If I know how many pixels or percent width/height are added in each direction, I can make the saved image bigger ready to crop with knowledge of what the extra border will occupy.

Jeff_in_90620

I haven't noticed anything like that happening. 

However, when you fit a Model space View to a Paper space Viewport and place that Viewport on a Paper space, you are going to get extra stuff added if they don't have all the same perspective.

Jeff


Jeff

TC 2026 Pro Platinum plus 2015->2024 (most with LightWorks & RedSDK) & V21
System: AMD Ryzen 9 7950X, MSI Mag X670E Tomahawk WiFi, 64GB RAM @ 4.80GHz, ARC A770 w/16GB, 3 x Samsung NVMe 990 (1TB), Windows 11 Pro (64-bit)

John R

The nearest I can figure out what you're attempting is =SUM(8.5/11) which gives you 0.772727273. Then multiply that with something.

I find it far simpler to do a couple test shots in Wireframe, crop, then render (if Modelspace). It also depend on where you're generating the image; Modelspace or Paperspace. For a finished product shot, I'd go with Paperspace and use PNG format over JPG. You can edit a PNG without degrading the image every time you save, JPG gets worse-n-worse with every edit. I'd only use JPG as a final output from my image editor (kinda like work-n-save in TCW, save a copy as DWG). If I have to meet a specified height or width requirement, I would use the "Resize" feature in the image editor with the Aspect Ratio locked.
John R.

V17—V21, 2015—2025
Designer, Deluxe, (Basic, Expert, Professional), Platinum
RedSDK enabled
Windows 11 Pro (25H2), 64-bit

Josh T.

#3
I messed with this about a year ago in v11.2, and I figured that whatever output dimension you want (example 17" sheet size at 600dpi = 10,200 pixels) needs exactly 2% added to it, so that a 10,200 pixel desired size would need to be set at 10,404 in the export dialog.

The method would be to draw a zero-width border representing the outer edge of a sheet of paper within TurboCAD, then export the over-sized image file (normal dimension x dpi, then add 2%).  You can then use an image editor to get rid of the extra blank space and edge border, leaving you with what should be 10,200 pixels.

Bear in mind that this was in an older version of TurboCAD, done in model space, and done using JPG settings (v11.2 did not have image formats other than BMP and JPG).  I have no clue if other image settings work the same way, or if settings have change since v11.2, but it would be an easy experiment to try out.


Let me add that if correct, this method should eliminate any resizing of the exported image--only cropping will be required.  The hardest part is doing the math and drawing the extra border.
Josh T.
meatballrocketry.com
TC Pro 18.2 & Platinum 2016

Kenneth Martin

On a similar note, I always liked the 3DS Max way of rendering in a seperate window, with your desired settings. I have asked for this time & time again, & most of the TC users just dont get it.
TurboCAD user since v3
TurboCAD on flickr || My twitter ||

Orion20036

Thanks for the feedback everyone, I think the percentage method is worth a try, I will give it a go later. What I want is the shortest possible method. If I can add the percentage, then afterwards do a canvas resize in psp, then it is finished in one operation.

Josh T.

Quote from: Michael Geraghty on July 30, 2010, 08:16:53 AM
Thanks for the feedback everyone, I think the percentage method is worth a try, I will give it a go later. What I want is the shortest possible method. If I can add the percentage, then afterwards do a canvas resize in psp, then it is finished in one operation.

I did some experiments in v17.1, so I posted a more complete method and example in the Tips & Tricks forum:

http://forums.turbocad.com/index.php/topic,4023.0.html
Josh T.
meatballrocketry.com
TC Pro 18.2 & Platinum 2016