Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


CRDR-Image Processor (Including Rotating Image on CE Form)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Extensions
View previous topic :: View next topic  
Author Message
Corroder
Grandmaster Cheater
Reputation: 27

Joined: 10 Apr 2015
Posts: 994

PostPosted: Fri Jun 21, 2019 4:48 am    Post subject: CRDR-Image Processor (Including Rotating Image on CE Form) Reply with quote

Some CEF members ask how to rotate an image on CEImage inside a CE Form, using CE Lua scripting. To rotate an image using Lua scripting for example below is Lua function to rotate an image, but you need to translate the script syntax to CE Lua:

Code:
-- Rotates a picture
-- BackColor is Optional
function Rotate(img,angle,backColor)
local angRad = angle*math.pi/180
local cosine = math.cos(angRad)
local sine = math.sin(angRad)

local width_out = math.ceil(img:width()*math.abs(cosine)+img:height()*math.abs(sine))
local height_out = math.ceil(img:width()*math.abs(sine)+img:height()*math.abs(cosine))
local out = img.createEmpty(width_out,height_out)
out:clear(backColor or Color.new(255,255,255))

local x_center_image = img:width()/2
local y_center_image = img:height()/2
local x_center_outImage = out:width()/2
local y_center_outImage = out:height()/2

   for y=0,height_out-1 do
      for x = 0,width_out-1 do
      local outX = math.ceil(cosine*(x-x_center_outImage)+sine*(y-y_center_outImage)+x_center_image)
      local outY = math.ceil(-sine*(x-x_center_outImage)+cosine*(y-y_center_outImage)+y_center_image)
         if outX >= 0 and outX < img:width() and outY >=0 and outY < img:height() then
         out:pixel(x,y,img:pixel(outX,outY))
         end
      end
   end

   return out
end


I don't want to translate/adapted that script to CE Lua script because (maybe) I don't know how to do that since I am not a programmer and I have nothing about scripting. I hope there are CEF members able to do that and make it work for CE Lua scripting.

Anyhow, I made a small VB Net app. and combine that app to CE Form environments which able to handle/processing a CE Image on a CE Form.
You can use this app as a standalone executable file or as table file on CE Form/CETrainer.

Project Detail
Project name: CRDR-ImageProcessor
Author/Creator: Corroder a.k.a VCL-Bro
Release date: 21-06-2019

Description:
A VB Net app connect to CE Form, use for handling CEImage, including:
- Load/Save Image
- Transform image: Grayscale, negative, monochrome. sepia, red, green, blue and image brightness
- Handling image: Rotate, Flip Horizontal, Flip Vertical
- Including a snipping tool/screenshot which allows the user to capture particularly screen area
- Handle image raw format type: JPEG, PNG, BMP and ICON
- Send the image to CE Form
- Receive an image from CEImage on CEForm

Requirement
- CE 6.8.3
- Lua 5..3
- Net. 4.5

Term To Use
This app are 100% free

File attached on the download link
- CRDR-ImageProcessor (executable file)
- Change Image CT from VB.CT (a sample CT file about how to use it)

Demo Video
https://youtu.be/khhHiQ4gH00

Download link
https://www.mediafire.com/file/uy9unwhdfqa7p6a/CRDR-ImageProcessor.rar/file

(VB Net solution/code not include)

Enjoy... Laughing



CRDRImageProcessor.JPG
 Description:
CRDR-ImageProcessor
 Filesize:  147.72 KB
 Viewed:  2931 Time(s)

CRDRImageProcessor.JPG



_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Extensions All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites