javaËõ·ÅͼƬÔÀí
±¾ÎÄΪԴ´£¬ÈçÐèתÔØ£¬Çë×¢Ã÷×÷Õߺͳö´¦£¬Ð»Ð»£¡
Ëõ·ÅͼÏñµÄ»ù±¾ÔÀíÊÇ´´½¨Ò»¸öÄ¿±ê´óСµÄ»²¼£¬È»ºó¶ÁȡԴͼÏñ£¬²¢½«¸ÃͼÏñ»æÖÆÕâ¸ö»²¼ÉÏ¡£ÎªÁËʹ³ÌÐòͨÓã¬Ô´Í¼ÏñºÍËõ·ÅºóµÄÄ¿±êͼÏñÓ¦Ó÷ֱðʹÓà InputStreamºÍOutputStreamÀ´±íʾ£¬´úÂëÈçÏ£º
public static void scaleImage(InputStream imgInputStream,
OutputStream imgOutputStream, int scale)
{
try
{
Image src = javax.imageio.ImageIO.read(imgInputStream);
int width = ( int ) (src.getWidth( null ) * scale / 100.0 );
int height = ( int ) (src.getHeight( null ) * scale / 100.0 );
BufferedImage bufferedImage = new BufferedImage(width, height,
BufferedImage.TYPE_INT_RGB);
bufferedImage.getGraphics().drawImage(
src.getScaledInstance(width, height, Image.SCALE_SMOOTH),
0 , 0 , null );
JPEGImageEncoder encoder = JPEGCodec
&n
Ïà¹ØÎĵµ£º
¡¡ÔÚC++ºÍJavaÖж¼´æÔÚÀàÒýÓã¬C++ÖÐÊÇÒªÃ÷È·Ö¸³öµÄ£¬ÏÔÐÔµÄ;¶øJavaÖÐÊÇÒþÐεġ£
¡¡¡¡ÔÚC++ÖУ¬"T &b=a;" ˵Ã÷bÊÇaµÄÒýÓã¬Á½ÕßÊÇͬÃû£¬Ö¸µÄͬһ¸ö¶«Î÷¡£¶ø·ÇÖ¸ÕëµÄÀàÉùÃ÷£¬¾Íͬʱ´´½¨ÁËÒ»¸öÀ࣬Èç"T a;"ʵ¼ÊÉÏaÒѾʵÀý»¯ÁË¡£¶øÉùÃ÷ÀàÒýÓÃʱ²»ÐèÒª´´½¨Ð¶ÔÏ󣬶øÊÇÖ±½ÓÖ¸ÏòÔÀ´µÄ¶ÔÏó¡£
¡¡¡¡ÀàÒýÓÃÔÚº¯ÊýµÄÐβκͷ ......
Java³ÌÐòµÄÔ´´úÂëºÜÈÝÒ×±»±ðÈË͵¿´¡£Ö»ÒªÓÐÒ»¸ö·´±àÒëÆ÷£¬ÈκÎÈ˶¼¿ÉÒÔ·ÖÎö±ðÈ˵ĴúÂë¡£±¾ÎÄÌÖÂÛÈçºÎÔÚ²»ÐÞ¸ÄÔÓгÌÐòµÄÇé¿öÏ£¬Í¨¹ý¼ÓÃܼ¼Êõ±£»¤Ô´´úÂë¡£
ΪʲôҪ¼ÓÃÜ£¿
¶ÔÓÚ´«Í³µÄC»òC++Ö®ÀàµÄÓïÑÔÀ´Ëµ£¬ÒªÔÚWebÉϱ£»¤Ô´´úÂëÊǺÜÈÝÒ׵ģ¬Ö»Òª²»·¢²¼Ëü¾Í¿ÉÒÔ¡£Òź¶µÄÊÇ£¬Java³ÌÐòµÄÔ´´úÂëºÜÈÝÒ×±»±ðÈË͵¿´¡£Ö»ÒªÓÐÒ»¸ ......
1.¾Ö²¿±äÁ¿ÔÚʹÓõÄʱºò±ØÐëÒѾ±»³õʼ»¯
2.byte b=2,e=3
byte c=b+c; »á±àÒ벻ͨ¹ý£¬Ó¦Îªb+c»á×Ô¶¯ ÀàÐÍÌáÉýλint Èç¹ûÏëµÃµ½ byte c ±ØÐëÇ¿ÖÆתÐÍ byte c=(byte)b+c;
3.f ......