image_to_video_im 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/README.md +4 -0
- data/lib/image_to_video_im.rb +11 -0
- metadata +51 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 0bee95d917cd22ce6cef048c94d374c13e8fdcfe87259859bade92b1481732b2
|
|
4
|
+
data.tar.gz: b15a9ed540fdb17b94146cfcb14cb7d1e27d3807cb3335a4f23400f4a01e3670
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: ee51ba040ac32d762c775dbdd904d3c1e379981f83e153bf69055d03080f33949cda6c93e69fe6bcc5e03c3e1e622bffd6d4b5d6aa3023de9f75d07cf17a6880
|
|
7
|
+
data.tar.gz: f310891c1d4b8048a643e86788cae56e628f64d6525d8fc6730b156f46c5fe3c8cfee720ec158f271798427cfd6cef4f207d1651b9ea5502205e38040fba7b6f
|
data/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
module ImageToVideoIm
|
|
3
|
+
STUDIO_URL = "https://image-to-video.im/"
|
|
4
|
+
FREE_PREVIEW_URL = "https://image-to-video.im/free-image-to-video"
|
|
5
|
+
SUPPORTED_ASPECTS = [[16, 9], [9, 16], [1, 1], [4, 3]].freeze
|
|
6
|
+
def self.nearest_aspect(w, h)
|
|
7
|
+
r = w.to_f / [h.to_i, 1].max
|
|
8
|
+
b = SUPPORTED_ASPECTS.min_by { |x, y| ((x.to_f / y) - r).abs }
|
|
9
|
+
"#{b[0]}:#{b[1]}"
|
|
10
|
+
end
|
|
11
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: image_to_video_im
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Tengda Studio
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2026-12-06 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description: Lightweight Ruby aspect-ratio normalizer and prompt preset helper for
|
|
14
|
+
ImageToVideo (https://image-to-video.im/) and Free Image to Video daily preview
|
|
15
|
+
(https://image-to-video.im/free-image-to-video). Pay-as-you-go never-expiring credit
|
|
16
|
+
packs, no forced subscription, auto-refund on failed jobs, SFW compliant.
|
|
17
|
+
email:
|
|
18
|
+
- submit@nene.video
|
|
19
|
+
executables: []
|
|
20
|
+
extensions: []
|
|
21
|
+
extra_rdoc_files: []
|
|
22
|
+
files:
|
|
23
|
+
- README.md
|
|
24
|
+
- lib/image_to_video_im.rb
|
|
25
|
+
homepage: https://image-to-video.im/
|
|
26
|
+
licenses:
|
|
27
|
+
- MIT
|
|
28
|
+
metadata:
|
|
29
|
+
homepage_uri: https://image-to-video.im/
|
|
30
|
+
documentation_uri: https://image-to-video.im/free-image-to-video
|
|
31
|
+
source_code_uri: https://image-to-video.im/
|
|
32
|
+
post_install_message:
|
|
33
|
+
rdoc_options: []
|
|
34
|
+
require_paths:
|
|
35
|
+
- lib
|
|
36
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - ">="
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: 2.6.0
|
|
41
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
42
|
+
requirements:
|
|
43
|
+
- - ">="
|
|
44
|
+
- !ruby/object:Gem::Version
|
|
45
|
+
version: '0'
|
|
46
|
+
requirements: []
|
|
47
|
+
rubygems_version: 3.0.3.1
|
|
48
|
+
signing_key:
|
|
49
|
+
specification_version: 4
|
|
50
|
+
summary: Aspect-ratio normalizer and prompt preset helper for ImageToVideo (image-to-video.im)
|
|
51
|
+
test_files: []
|