![]() |
|
[سؤال] تغيير كود جافا الى فيجوال بيسك - نسخة قابلة للطباعة +- منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب (http://vb4arb.com/vb) +-- قسم : قسم لغة الفيجوال بيسك VB.NET (http://vb4arb.com/vb/forumdisplay.php?fid=182) +--- قسم : قسم اسئلة VB.NET (http://vb4arb.com/vb/forumdisplay.php?fid=183) +--- الموضوع : [سؤال] تغيير كود جافا الى فيجوال بيسك (/showthread.php?tid=23468) |
تغيير كود جافا الى فيجوال بيسك - amna jamal - 22-01-18 السلام عليكم هل هناك من ييرمج بلغة الجافا ويمكنه ان يغير لي هذا الكود الى كود فيجوال بيسك؟؟ /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package javaapplication5;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.*;
import java.awt.*;
/**
*
* @author home
*/
public class JavaApplication5 {
/**
* @param args the command line arguments
* @throws java.io.IOException
*/
public static void main(String[] args) throws IOException{
// TODO code application logic here
File file = new File("bear.jpg"); // I have bear.jpg in my working directory
FileInputStream fis = new FileInputStream(file);
BufferedImage image = ImageIO.read(fis); //reading the image file
int rows = 4; //You should decide the values for rows and cols variables
int cols = 4;
int chunks = rows * cols;
int chunkWidth = image.getWidth() / cols; // determines the chunk width and height
int chunkHeight = image.getHeight() / rows;
int count = 0;
BufferedImage imgs[] = new BufferedImage[chunks]; //Image array to hold image chunks
for (int x = 0; x < rows; x++) {
for (int y = 0; y < cols; y++) {
//Initialize the image array with image chunks
imgs[count] = new BufferedImage(chunkWidth, chunkHeight, image.getType());
// draws the image chunk
Graphics2D gr = imgs[count++].createGraphics();
gr.drawImage(image, 0, 0, chunkWidth, chunkHeight, chunkWidth * y, chunkHeight * x, chunkWidth * y + chunkWidth, chunkHeight * x + chunkHeight, null);
gr.dispose();
}
}
System.out.println("Splitting done");
//writing mini images into image files
for (int i = 0; i < imgs.length; i++) {
ImageIO.write(imgs[i], "jpg", new File("img" + i + ".jpg"));
}
System.out.println("Mini images created");
}
}
RE: تغيير كود جافا الى فيجوال بيسك - عبدالله الدوسري - 22-01-18 إبحث في قوقل عن java to vb.net توجد مواقع للتحويل من وإلى قم بالتحويل وجرب النتائج من الممكن أن تجد أخطاء كثيرة وتحتاج إلى تصحيح بشري لا تنجح دائماً المحولات RE: تغيير كود جافا الى فيجوال بيسك - amna jamal - 22-01-18 (22-01-18, 04:52 PM)عبدالله الدوسري كتب : إبحث في قوقل عن جزاك الله الف خير RE: تغيير كود جافا الى فيجوال بيسك - أبو ناصر - 23-01-18 اليك موقع متميز يحتوي على تطبيقات تحويل من لغة الى لغة أخرى مع العكس Convert Between VB.NET and Java Convert Between Java and C# Convert Between Java and C++ Convert Between VB.NET and C# Convert Between C++ and C# Convert Between VB.NET and C++ يمكنك تحميل نسخة مجانية Free Editionاو مدفوعة Premium Edition رابط الموقع RE: تغيير كود جافا الى فيجوال بيسك - silverlight - 23-01-18 الواضح من كود الجافا أنك تريد تقسيم الصورة الأصلية الي عدة صور صغيرة ثم نحفظ تلك الصورة في مصفوفة ثم لاحقا تحفظ الصور الصغيرة علي الكمبيوتر الكود التالي مكتوب بالفيجوال بيك دوت نت وسوف يؤدي المطلوب PHP كود : ' نحدد الصورة المراد تقسيمهاملجوظة: تستطيع حفظ الصورة مباشرة بدلا من اضافتها الي مصفوفة RE: تغيير كود جافا الى فيجوال بيسك - خالد - 23-01-18 السلام عليكم ورحمة الله وبركاته تفضلي يا أختي آمنه، تحويل كود الجافا إلى كود فيجوال بيسك كود : Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click |