If that helps: a plugin for easily exporting SketchUp images, as shown in the viewport but with free input of height, width, format and compression.
Originally modified for a smooth scene animation to coincide with the Skindigo AnimationExport (Indigo Render Animation).
Here reduced to a SketchUp single image output with input of image parameters.
Transfer the code to an rb file called Single_Image_Export.rb and copy it to the plugin folder of the respective SUp version (tested up to SUp2022).
Restart SketchUp ....
# Formerly Created by Dale Martens AKA 'Whaat' as "Smoothstep Animation"
# Released 6 Oct 2008 As-is and without warranty of any kind.
# Originally modified by faust07 for a smooth scene animation to coincide with the Skindigo AnimationExport (Indigo Render Animation).
# Here reduced to a SketchUp single image export with input of image parameters.
# Modified by faust07 (AT) 2024-03-25
require 'sketchup.rb'
if( not file_loaded?("Single_Image_Export.rb") )
menu=UI.menu("Plugins")
menu.add_separator
menu.add_item("Export Single Image") {(SingleImageExport.new(true))}
end
file_loaded("Single_Image_Export.rb")
class SingleImageExport
def initialize(export) # export should be true or false
if export # Inputs
prompts = ["Width","Height","Format","Compression"]
values = ["1920","1080","JPG","1.0"]
format_choices = "JPG|PNG"
enums = [nil,nil,format_choices,nil]
results = UI.inputbox(prompts,values,enums,"Export Options")
if results
@width = results[0].to_i
@height = results[1].to_i
@format = results[2]
@comp = results[3].to_f
if @comp < 0.1 or @comp > 1.0
UI.messagebox("Compression must be between 0.1 and 1.0")
@export = false
return
end
def_filename = "SU."+@format.downcase
path = UI.savepanel "Export Frame","",def_filename
if path
@export_path = File.dirname(path)
@filename = File.basename(path,".*") # remove the file extension
end
end
end
# single image export
@image_path = File.join(@export_path,@filename + ".#{@format.downcase}")
Sketchup.set_status_text("Exporting Frame to #{@image_path}")
Sketchup.active_model.active_view.write_image(@image_path, @width, @height, true, @comp)
end # end def initialize(export)
end # class